Skip to content

Add configuration value to Consul check to not send service metrics containing service name #20309

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mimato
Copy link

@mimato mimato commented May 15, 2025

What does this PR do?

  • add a new option services_tags_include_service_name to the Consul check configuration (this name is kind of awkward, I was trying to match existing options but very open to suggestions)
  • if set to false, the consul checks will not produce the service tags that look like consul_<servicename>_service_tag:<consultag> in addition to the consul_service_tag:<consultag>
  • defaults to true, to maintain backward compatibility
  • this substantially reduces the number of tags that the check produces

Motivation

We have a lot of Consul services and a lot of tags, and the additional consul_<servicename>_service_tag:<consultag> for every consul tag makes an explosion of tags that we don't use, since we can combine service: and consul_service_tag in queries to get the same result, and that is clearer. We would like to turn these off so we have fewer tags around.

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

mimato added 3 commits May 14, 2025 17:33
- add a new option `services_tags_include_service_name` to the consul configuration
- if set to false, the consul checks will not produce the service tags that look like `consul_<servicename>_service_tag:<consultagkey>=<consultagvalue>`
- defaults to true, to maintain backward compatibility
- this substantially reduces the number of tags that the check includes
janine-c
janine-c previously approved these changes May 15, 2025
Co-authored-by: Janine Chan <[email protected]>
@temporal-github-worker-1 temporal-github-worker-1 bot dismissed janine-c’s stale review May 20, 2025 14:50

Review from janine-c is dismissed. Related teams and files:

  • documentation
    • consul/assets/configuration/spec.yaml
    • consul/datadog_checks/consul/data/conf.yaml.example
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.

2 participants