Skip to content

Add allow list configuration for Consul service tags to Consul check #20306

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 6 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 configuration option services_tags_keys_include to the consul check to allow specification of a list of allowed tag keys to be sent to Datadog, all other tags will be removed (this name is kind of awkward, I was trying to match existing options but very open to suggestions)
  • if the allow list is empty/not set, all tags are sent (matching existing behavior)

Motivation

We have a lot of tags (50+) on some of our consul services (for traefik routing and other purposes) that are not needed in Datadog, and would like to filter them out.

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 2 commits May 14, 2025 16:59
- consul services frequently have a lot of tags that are not relevant to monitoring (routing rules, etc.)
- add a configuration option `services_tags_keys_include` to the consul check to allow specification of a list of allowed tag keys to be sent to Datadog
- if the allow list is empty/not set, all tags are sent (matching existing behavior)
janine-c
janine-c previously approved these changes May 15, 2025
Copy link
Contributor

@janine-c janine-c left a comment

Choose a reason for hiding this comment

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

Some minor suggestions to address an awkward comma :)

Clean up description phrasing

Co-authored-by: Janine Chan <[email protected]>
@temporal-github-worker-1 temporal-github-worker-1 bot dismissed janine-c’s stale review May 15, 2025 19:11

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