Add metrics_prefix to discovery block - #24861
Open
vitkyrka wants to merge 2 commits into
Open
Conversation
…rakend, prefect Alternative to PR #24738's auto-detection approach, which computed each integration's metrics_prefix from manifest.json or the repo's .ddev/config.toml override table at `ddev validate config` time. Integration owners raised a concern that this made .ddev/config.toml, a developer/tooling config file, silently production-critical, since a wrong or missing entry there would flow straight into the auto_conf.yaml shipped with the Agent. This hand-authors the same metrics_prefix values directly in each integration's assets/configuration/spec.yaml via a discovery.example override on the existing auto_conf/discovery template, using the same override mechanism already used for ad_identifiers' value.example and krakend's cel_selector.example. auto_conf.yaml is then regenerated with `ddev validate config -s`, producing output identical to PR #24738's. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
evalya-impact-summaryevalya impact analysis |
Contributor
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: e35aa9d | Docs | Datadog PR Page | Give us feedback! |
vitkyrka
marked this pull request as ready for review
August 14, 2026 13:01
estherk15
approved these changes
Aug 14, 2026
nubtron
approved these changes
Aug 14, 2026
Contributor
Validation ReportAll 21 validations passed. Show details
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a
metrics_prefixfield to thediscoveryblock ofauto_conf.yamlforgearmand,krakend, andprefect— the three integrations whose metric prefix diverges from their check name and that currently ship adiscoveryblock.This allows the core agent to detect conflicts with a generic
openmetrics/prometheusconfig. See https://datadoghq.atlassian.net/wiki/spaces/DSCVR/pages/7031522288/ for more information.This is an alternative to #24738 which computed the
metrics_prefixvalue automatically atddev validate configtime, by reading each integration'smanifest.jsonor, for integrations without one, the repo's.ddev/config.toml[overrides.metrics-prefix]table (the same sourceddev validate metadataalready consults). Code owners objected to that approach since it made.ddev/config.toml— a file intended as developer/tooling configuration — production-critical.This PR instead hand-authors the value directly in each affected integration's
spec.yaml, so it's an explicit, reviewable part of the integration's own spec rather than a side effect of unrelated dev tooling.auto_conf.yamlremains a generated file (regenerated here viaddev validate config).Motivation
https://datadoghq.atlassian.net/browse/DSCVR-640
Review checklist (to be filled by reviewers)
qa/requiredif this PR needs QA validation, orqa/skip-qaif it does not. Exactly one of the two is required.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged