Skip to content
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

drop extra prometheus metadata metrics for container insights #1555

Merged
merged 9 commits into from
Feb 20, 2025

Conversation

movence
Copy link
Contributor

@movence movence commented Feb 19, 2025

Description of the issue

Agent is pushing incomplete EMF log entries from prometheus receiver. These entries only contain prometheus metadata metrics:

  • up
  • scrape_duration_seconds
  • scrape_samples_scraped
  • scrape_series_added
  • scrape_samples_post_metric_relabeling

Description of changes

  • Add filterprocessor to containerinsights pipeline
  • Add metric filtering rules for those metadata
  • Update filter processor translator to handle containerinsights pipeline correctly since it was originally intended for only JMX

Rev 1

  • move kueue pipeline name const to common package
  • update tests

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

Verified those metadata stopped getting pushed to CloudWatch using LogInsights query:

fields @timestamp, @message
| filter @message like 'scrape_samples_post_metric_relabeling'
| sort @timestamp desc

Passing integ test for emf-logs https://github.com/aws/amazon-cloudwatch-agent/actions/runs/13404682400/job/37442422498

Requirements

Before commit the code, please do the following steps.

  1. Run make fmt and make fmt-sh
  2. Run make lint

@movence movence requested a review from a team as a code owner February 19, 2025 16:38
sky333999
sky333999 previously approved these changes Feb 19, 2025
@sky333999 sky333999 merged commit ce06289 into main Feb 20, 2025
7 checks passed
@sky333999 sky333999 deleted the extra-emf branch February 20, 2025 21:10
musa-asad pushed a commit that referenced this pull request Mar 6, 2025
musa-asad pushed a commit that referenced this pull request Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants