Skip to content

kubernetes_sd_config: support retrieving K8s deployment/cronjob/job name #16747

Description

@cyrille-leclerc

Proposal

In order to better correlate Prometheus and OpenTelemetry metrics, we would like adopt the OpenTelemetry naming specifications (link) on Prometheus metrics.
This requires to discover the name of the deployment/cronjob/job that create pods so in addition to supporting __meta_kubernetes_pod_name in kubernetes_sd_config, we would like to have __meta_kubernetes_deployment_name, __meta_kubernetes_conjob_name, and __meta_kubernetes_job_name.
This feature seems to be implemented in the OpenTelemetry Collector K8s Attributes Processor navigating from the pod description to the controlling daemonset/statefulset/replicaset and again navigating to the controlling deployment/cronjob/job.

For feature parity with Openelemetry, the Prometheus discovery could also add support for discovering the daemonset/statefulset/replicaset.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions