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

Implement new receiver to add prometheus scraper for Kueue metrics #253

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

rvasahu-amazon
Copy link

@rvasahu-amazon rvasahu-amazon commented Nov 14, 2024

See this previous PR which merges these same code changes into the kueue-observability branch of the amazon-contributing/opentelemetry-collector-contrib repo. This PR now merges those changes into aws-cwa-dev.

Description:

This PR is intended to add a new receiver based on the existing AWS Container Insights Receiver for Kueue metrics. This new receiver, much like the control plane metrics scraping capability of the ACIR, essentially creates a scrape config and passes it to a lower-level Prometheus receiver.

Link to tracking Issue: None.

Testing:

  • Unit testing for the new Kueue prometheus scraper component.
  • Unit testing for modified existing components.

Integration tests are being added to amazon-cloudwatch-agent-test. See this PR.

Documentation: Pending.

…mazon-contributing#252)

* change: add kueue metric names, types, and units

* feat: add prometheus scraper for Kueue metrics to AWS Container Insights Receiver

* change: integrate Kueue prometheus scraper into ACIR

* change: add config flag for Kueue metric scraping

* doc: remove commented-out cosmetic relabel configs

* change: use k8s service discovery config for kueue prometheus scraper

* doc: replace todo comment in metric to unit mapping

* doc: add description yaml for this change

* fix: remove usage of k8s endpoint from initKueuePrometheusScraper

* test: add case for kueue metrics to metric_translater_test

* test: unit tests for new component kueue_prometheus_scraper.go

* doc: fix comment in source code, remove commented out code in test code

* doc: remove comments tracking action items

* doc: remove todo, edit comment to reference component rather than file

* fix: replace incorrect label selector in service discovery config

change: only look in ``kueue-system`` namespace

* change: remove unused metrics

test: remove unused metrics from test coverage

* doc: remove comment explaining self-evident code

* fix: add action and blanket regex to ClusterName relabel config

* refactor: drop unused cluster ca cert file

* fix: add shutdown call for kueue scraper

doc: reword a comment for clarity

* change: avoid scraping kueue webhook service with field selector

* refactor: add helper function to retrieve relabel configs

* change: casing convention on Kueue dimensions (snake to upper camel)

* Rename the Kueue metric flag

* change: spoof NodeName label in order to set output log stream for Kueue metrics

* change: stop scraping kueue_cluster_queue_borrowing_limit

change: remove constants for uncaptured metrics

change: add new Kueue metric type

* Clean up KueueContainerInsights references

* change: remove unused TypeWorkload constant.

* change: remove kueue scraper from aws container insights receiver

* change: implement kueue metrics scraping into a separatereceiver

* doc: update kueue_metrics.yaml to reflect new kueue metrics implementation

* fix: remove kueue fields from ACIR factory

* fix: remove commented-out kueue prometheus scraper from ACIR

* fix: return error when scraper fails to init

* doc: remove comment referring to leader

---------

Co-authored-by: FirstName LastName <[email protected]>
@sky333999 sky333999 merged commit cb251fe into amazon-contributing:aws-cwa-dev Nov 14, 2024
125 of 137 checks passed
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