Skip to content

Commit

Permalink
Fix tags in AWSSQSQUEUE entity (#1790)
Browse files Browse the repository at this point in the history
* fix: Fixes tag mapping definition in AWSSQSQUEUE

* fix: Adds clarification of entityTagNames syntax in the docs
  • Loading branch information
jsubirat authored Nov 19, 2024
1 parent 6b9cb6e commit d720016
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
12 changes: 12 additions & 0 deletions docs/entities/synthesis.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,18 @@ synthesis:

You can also change the name of the tag to another value, rather than using the name in the attribute. In general, we suggest not to use this configuration unless you are trying to use more standard namings, since sometimes it's difficult for the user to see the difference between entity tags and telemetry attributes, and changing the names could cause even more confusion.

This is the relevant syntax:
```yaml
synthesis:
rules:
- identifier: someIdAttribute
name: someNameAttribute
tags:
originalAttributeName:
entityTagNames: [desiredTagName1, desiredTagName2]
```
The above example will result in an entity having two tags, `desiredTagName1` and `desiredTagName2`, with the value present in the `originalAttributeName` attribute from the processed data point.

A good use case for this feature is `CONTAINER`: A container has different sources (docker, kubernetes, etc.), and we rename the tags to use a standard naming and a "per source" name.

```yaml
Expand Down
16 changes: 8 additions & 8 deletions entity-types/infra-awssqsqueue/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ synthesis:
# Used in AWSSQSQUEUE.yml for entity relationship candidates
aws.sqs.QueueName:
# Used in AWSSQSQUEUE.yml for entity relationship candidates
aws.accountId:
entityTagNames: [ recipientAccountId ]
recipientAccountId:
entityTagNames: [ aws.accountId ]
# Used in AWSSQSQUEUE.yml for entity relationship candidates
aws.region:
entityTagNames: [ awsRegion ]
awsRegion:
entityTagNames: [ aws.region ]
# Metrics Streams and API Polling entities using the ARN to compute the entity.guid
- identifier: aws.Arn
name: aws.sqs.QueueName
Expand All @@ -54,8 +54,8 @@ synthesis:
# Used in AWSSQSQUEUE.yml for entity relationship candidates
aws.sqs.QueueName:
# Used in AWSSQSQUEUE.yml for entity relationship candidates
aws.accountId:
entityTagNames: [ recipientAccountId ]
recipientAccountId:
entityTagNames: [ aws.accountId ]
# Used in AWSSQSQUEUE.yml for entity relationship candidates
aws.region:
entityTagNames: [ awsRegion ]
awsRegion:
entityTagNames: [ aws.region ]

0 comments on commit d720016

Please sign in to comment.