-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Introduce join_standard_tags setting #6253
Conversation
`join_standard_tags` enables label joins for standard tags captured from the following labels: - `tags.datadoghq.com/version` - `tags.datadoghq.com/env` - `tags.datadoghq.com/service` Metrics are being enriched for the following objects: Pod, Deployment, ReplicaSet, DaemonSet, StatefulSet, Job, CronJob.
893b95b
to
d921f76
Compare
{ | ||
"kube_pod_labels": { | ||
"labels_to_match": ["pod", "namespace"], | ||
"labels_to_get": [ | ||
"label_tags_datadoghq_com_env", | ||
"label_tags_datadoghq_com_service", | ||
"label_tags_datadoghq_com_version" | ||
] | ||
}, | ||
"kube_deployment_labels": { | ||
"labels_to_match": ["deployment", "namespace"], | ||
"labels_to_get": [ | ||
"label_tags_datadoghq_com_env", | ||
"label_tags_datadoghq_com_service", | ||
"label_tags_datadoghq_com_version" | ||
] | ||
}, | ||
"kube_replicaset_labels": { | ||
"labels_to_match": ["replicaset", "namespace"], | ||
"labels_to_get": [ | ||
"label_tags_datadoghq_com_env", | ||
"label_tags_datadoghq_com_service", | ||
"label_tags_datadoghq_com_version" | ||
] | ||
}, | ||
"kube_daemonset_labels": { | ||
"labels_to_match": ["daemonset", "namespace"], | ||
"labels_to_get": [ | ||
"label_tags_datadoghq_com_env", | ||
"label_tags_datadoghq_com_service", | ||
"label_tags_datadoghq_com_version" | ||
] | ||
}, | ||
"kube_statefulset_labels": { | ||
"labels_to_match": ["statefulset", "namespace"], | ||
"labels_to_get": [ | ||
"label_tags_datadoghq_com_env", | ||
"label_tags_datadoghq_com_service", | ||
"label_tags_datadoghq_com_version" | ||
] | ||
}, | ||
"kube_job_labels": { | ||
"labels_to_match": ["job", "namespace"], | ||
"labels_to_get": [ | ||
"label_tags_datadoghq_com_env", | ||
"label_tags_datadoghq_com_service", | ||
"label_tags_datadoghq_com_version" | ||
] | ||
}, | ||
"kube_cronjob_labels": { | ||
"labels_to_match": ["cronjob", "namespace"], | ||
"labels_to_get": [ | ||
"label_tags_datadoghq_com_env", | ||
"label_tags_datadoghq_com_service", | ||
"label_tags_datadoghq_com_version" | ||
] | ||
}, | ||
} | ||
) |
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.
should we declare these as global variables and refactor them a bit? we're duplicating labels_to_get
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.
Great point, will refactor, thank you!
@@ -70,7 +70,7 @@ kube_deployment_created{deployment="tiller-deploy",namespace="kube-system"} 1.50 | |||
# HELP kube_deployment_labels Kubernetes labels converted to Prometheus labels. | |||
# TYPE kube_deployment_labels gauge | |||
kube_deployment_labels{deployment="failingtest",label_app="failingtest",namespace="default"} 1 | |||
kube_deployment_labels{deployment="tiller-deploy",label_app="helm",label_name="tiller",namespace="kube-system"} 1 | |||
kube_deployment_labels{deployment="tiller-deploy",label_tags_datadoghq_com_env="dev",label_tags_datadoghq_com_service="tiller",label_tags_datadoghq_com_version="xyz",label_app="helm",label_name="tiller",namespace="kube-system"} 1 |
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 the tests, could you please cover all the targeted objects in this PR not only deployments and pods?
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.
Yes, will add those!
Codecov Report
|
What does this PR do?
join_standard_tags
enables label joins for standard tags captured from the following labels:tags.datadoghq.com/version
tags.datadoghq.com/env
tags.datadoghq.com/service
Metrics are being enriched for the following objects: Pod, Deployment, ReplicaSet, DaemonSet, StatefulSet, Job, CronJob.
Motivation
Unified tagging in KSM integration.
Additional Notes
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached