-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Kuma Integration (AI-4869) #19830
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Modifies the OpenMetrics base check to make the target_info variable configurable.
* 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.
Co-authored-by: Juanpe Araque <juanpedro.araque@datadoghq.com>
Co-authored-by: Juanpe Araque <juanpedro.araque@datadoghq.com>
There was a problem hiding this 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! 🚀
@AAraKKe thanks for the review, lots of improvements thanks to it! |
Review from AAraKKe is dismissed. Related teams and files:
- agent-integrations
- kuma/manifest.json
* 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
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)
qa/skip-qa
label if the PR doesn't need to be tested during QA.backport/<branch-name>
label to the PR and it will automatically open a backport PR once this one is merged