Skip to content

Conversation

@adel121
Copy link
Contributor

@adel121 adel121 commented Dec 3, 2025

What does this PR do? What is the motivation?

KSM metrics supports wildcards in annotations and labels as tags since 7.73.

Merge instructions

Merge readiness:

  • [] Ready for merge

For Datadog employees:

Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). Without this format, your pull request will not pass CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.

If your branch doesn't follow this format, rename it or create a new branch and PR.

[6/5/2025] Merge queue has been disabled on the documentation repo. If you have write access to the repo, the PR has been reviewed by a Documentation team member, and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #documentation channel in Slack.

Additional notes

@adel121 adel121 requested a review from a team as a code owner December 3, 2025 11:15
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

Preview links (active after the build_preview check completes)

Modified Files

@adel121 adel121 force-pushed the adelhajhassan/update-k8s-tags-docs-ksm branch from fe2a090 to 8f09692 Compare December 3, 2025 11:34
kubernetesResourcesLabelsAsTags:
pods:
"*": <PREFIX>_%%label%%
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%label%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

kubernetesResourcesLabelsAsTags:
pods:
"*": <PREFIX>_%%label%%
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%label%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0


```bash
DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS='{"pods":{"*": "<PREFIX>_%%label%%"}}'
DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS='{"pods":{"*": "<PREFIX>_%%label%%"}}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS='{"pods":{"*": "<PREFIX>_%%label%%"}}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS='{"pods":{"*": "<PREFIX>_%%label%%"}}' # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

kubernetesResourcesAnnotationsAsTags:
pods:
"*": <PREFIX>_%%annotation%% #
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%annotation%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

kubernetesResourcesAnnotationsAsTags:
pods:
"*": <PREFIX>_%%annotation%%
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%annotation%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

datadog:
podAnnotationsAsTags:
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM metrics
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"*": <PREFIX>_%%annotation%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%annotation%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0


```bash
DD_KUBERNETES_POD_ANNOTATIONS_AS_TAGS='{"*":"<PREFIX>_%%annotation%%"}'
DD_KUBERNETES_POD_ANNOTATIONS_AS_TAGS='{"*":"<PREFIX>_%%annotation%%"}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
DD_KUBERNETES_POD_ANNOTATIONS_AS_TAGS='{"*":"<PREFIX>_%%annotation%%"}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
DD_KUBERNETES_POD_ANNOTATIONS_AS_TAGS='{"*":"<PREFIX>_%%annotation%%"}' # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

global:
namespaceLabelsAsTags:
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%label%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

datadog:
namespaceLabelsAsTags:
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM metrics
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"*": <PREFIX>_%%label%% # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
"*": <PREFIX>_%%label%% # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0


```bash
DD_KUBERNETES_NAMESPACE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}'
DD_KUBERNETES_NAMESPACE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
DD_KUBERNETES_NAMESPACE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: wildcards do not work for KSM `kubernetes_state.*` metrics prior to agent version 7.73.0
DD_KUBERNETES_NAMESPACE_LABELS_AS_TAGS='{"*":"<PREFIX>_%%label%%"}' # Note: Wildcards do not work for KSM `kubernetes_state.*` metrics prior to Datadog Agent version 7.73.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants