8000 Kuma Integration (AI-4869) by nubtron · Pull Request #19830 · DataDog/integrations-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Kuma Integration (AI-4869) #19830

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

Merged
merged 39 commits into from
Jun 10, 2025
Merged

Kuma Integration (AI-4869) #19830

merged 39 commits into from
Jun 10, 2025

Conversation

nubtron
Copy link
Contributor
@nubtron nubtron commented Mar 13, 2025

What does this PR do?

This PR contains the Python implementation for the Kuma integrations and metadata.csv. I will include the assets and the readme.md in a subsequent PR.

The integration is OpenMetrics-based. It reads Kuma control-plate metrics from an Prometheus endpoint.

Control Plane Metadata

All metrics include copies of tags from cp_info metric. cp_info contains tags relevant to all metrics for a control plane, for example instance_id. I used the share_labels feature in the OpenMetrics base check to implement that.

HTTP Response Code Classes

To simplify the creation of dashboard widgets that monitor error codes creation, an HTTP response code class tag (e.g., 4xx for a 404 status) is added to HTTP response metrics.

Testing strategy

Unit tests process a full saved copy of a Prometheus payload from the control plane. E2E only check for minimal metrics that are guaranteed to be there, since the presence of many metrics depends on timing or activity.

Motivation

Kuma adoption is growing and it would be beneficial for Datadog to have an integration for it. AI-4869

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Copy link
codecov bot commented Jun 6, 2025

Codecov Report

Attention: Patch coverage is 79.03226% with 39 lines in your changes missing coverage. Please review.

Project coverage is 90.17%. Comparing base (1412bd3) to head (b29d556).
Report is 3 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
activemq ?
cassandra ?
confluent_platform ?
hive ?
hivemq ?
hudi ?
ignite ?
jboss_wildfly ?
kafka ?
kuma 79.03% <79.03%> (?)
presto ?
solr ?
tomcat ?
weblogic ?

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nubtron nubtron added qa/skip-qa Automatically skip this PR for the next QA and removed qa/skip-qa Automatically skip this PR for the next QA labels Jun 6, 2025
Modifies the OpenMetrics base check to make the target_info variable configurable.
@nubtron nubtron changed the title Kuma Integration Kuma Integration (AI-4869) Jun 9, 2025
* Add missing licence headers.
* Use share_lables instead of target_info.
* Undo changes in base check since the share_labels already supports my use-case.
* Update metadata.csv.
* Cover shared tags in tests.
@nubtron nubtron marked this pull request as ready for review June 9, 2025 08:47
@nubtron nubtron requested a review from AAraKKe June 10, 2025 12:19
AAraKKe
AAraKKe previously approved these changes Jun 10, 2025
Copy link
Contributor
@AAraKKe AAraKKe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time with the comments! 🚀

@nubtron
Copy link
Contributor Author
nubtron commented Jun 10, 2025

@AAraKKe thanks for the review, lots of improvements thanks to it!

@temporal-github-worker-1 temporal-github-worker-1 bot dismissed AAraKKe’s stale review June 10, 2025 15:23

Review from AAraKKe is dismissed. Related teams and files:

  • agent-integrations
    • kuma/manifest.json
@nubtron nubtron added this pull request to the merge queue Jun 10, 2025
Merged via the queue into master with commit 0ddb615 Jun 10, 2025
40 checks passed
@nubtron nubtron deleted the nubtron/kuma branch June 10, 2025 15:55
github-actions bot pushed a commit that referenced this pull request Jun 10, 2025
* Implement the Kuma metric collection logic and tests, without assets.

Modifies the OpenMetrics base check to make the target_info variable configurable.

* Update manifest.json description.

* Add codecov entries.

* Add labeler entry.

* Sync CI configuration.

* Delete dashboard placeholder.

* Don't use "Summary of..." in metric descriptions

* Disable histograms as buckets in configs.

* Remove empty entries for dashboards, monitors and saved views in manifest.json.

* Remove extra comments in metadata.csv.

* Improve metrics descriptions.

* * Disable histogram_buckets_as_distributions.

* Add missing licence headers.
* Use share_lables instead of target_info.
* Undo changes in base check since the share_labels already supports my use-case.
* Update metadata.csv.
* Cover shared tags in tests.

* Fix cursor command.

* Simplify assertions in test.

Co-authored-by: Juanpe Araque <juanpedro.araque@datadoghq.com>

* Fix tuple in assertion.

* Change process signatures.

* Delete IMAGES_README.md for now.

* Change openmetrics endpoint example in config.

* Use the openmetrics init_config template.

* Regenerate configs.

* SImplify "if" condition.

Co-authored-by: Juanpe Araque <juanpedro.araque@datadoghq.com>

* Remove unused code.

* Use the @pytest.fixture to avoid having unused parameters in test functions.

* Fix using count instead of bucket in test.

* Use a matrix for KUMA_VERSION env vars.

Co-authored-by: Juanpe Araque <juanpedro.araque@datadoghq.com>

* Parametrize suffixes for metrics tests.

* Don't assert in the middle of loops

* Add service check metadata.

* Split test in two.

* Flip parameters so that the suffix is reported last in the test result string.

* Speed up tests by avoiding unnecessary fixture setups.

* Run the linter.

* Edit wording in assertion.

* Edit comment.

* Edit Agent version.

* Revert process signatures changes so that they can be applied after the code freeze.

---------

Co-authored-by: Juanpe Araque <juanpedro.araque@datadoghq.com> 0ddb615
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0