-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AWS] [EC2] enrich events with EC2 tags with add_cloud_metadata processor #41477
base: main
Are you sure you want to change the base?
[AWS] [EC2] enrich events with EC2 tags with add_cloud_metadata processor #41477
Conversation
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
9adedf4
to
088385e
Compare
Thanks for working on this @Kavindu-Dodan !!
Just a reference: In AWS CloudWatch metricset, we are using |
@kaiyan-sheng my first reaction was that I think the tags field should be independent of the AWS service, because you can tag all/most AWS resources and not just EC2 instances. That could be useful generally for filtering metrics & logs by organisation or something. OTOH, opentelemetry-collector-contrib's resourcedetection processor uses OTOOH: it seems that resourcedetectionprocessor only supports adding tags for EC2, e.g. there's no support for tags for ECS: open-telemetry/opentelemetry-collector-contrib#14960. So... I don't know, but I'd be inclined to go with |
Yes @axw , I came across OTel resource detection processor EC2 tag [1] and tried to match our implementation with that. Currently processor also support Azure tags [2]
Since we already use Update I am testing the tag prefix change and will update the observations. Initially I am seeing some data ingestion issue but not sure this is related to tag key prefix. Update - 2 Okay, it was a permission issue when starting metricsbeat inside my AWS ec2 testbed. Change works fine (see Kibana screenshot) @kaiyan-sheng @axw appreciate another review [1] - https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.112.0/processor/resourcedetectionprocessor/internal/aws/ec2/ec2.go#L29 |
fb01541
to
d72b62f
Compare
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
d72b62f
to
091c5ca
Compare
Proposed commit message
This PR adds support to enrich events with EC2 tags iff,
Tags are added to event payload with key
aws.tags.<KEY>
,Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
The best way to validate this is through a beats deployment (ex:- metricbeat) in an EC2 instance.
add_cloud_metadata
processorRelated issues
Closes #31899
Screenshots
Footnotes
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html ↩
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/work-with-tags-in-IMDS.html#allow-access-to-tags-in-IMDS ↩