retina icon indicating copy to clipboard operation
retina copied to clipboard

Allow specifying additionalLabels sourced from pod labels

Open andreev-io opened this issue 1 year ago • 5 comments

Is your feature request related to a problem? Please describe. We would love to expose some pod metadata in the metrics reported by Retina pods, but we are limited to working with the (IP, port, direction, pod_name) set. Can we make it possible to specify any pod label name in additionalLabels to instruct Retina to populate that label as the metric label?

Describe the solution you'd like For example, if my pod has a label importantData: 123 that I want to report alongside the pod name, I would add a customLabel_importantData entry under the additionalLabels key in the MetricsConfigurationCRD and will in return start receiving Prometheus metrics annotated with {importantData="123"} labels.

Describe alternatives you've considered N/A

Additional context Sometimes a pod name does not contain all information needed to attribute a time series to a source.

andreev-io avatar Apr 04 '24 13:04 andreev-io

@rbtr Do you have any plans to deliver this feature in the near future? Can I contribute?

y0zg avatar Jul 03 '25 08:07 y0zg

@ibezrukavyi can help triage here?

rbtr avatar Jul 07 '25 21:07 rbtr

or @anubhabMajumdar

rbtr avatar Jul 07 '25 21:07 rbtr

@SRodi Could you please triage and help @y0zg to contribute.

ibezrukavyi avatar Jul 07 '25 22:07 ibezrukavyi

Hi @y0zg, I'm happy to assign this issue to you if you like to contribute! Retina’s current implementation stores all pod labels in metadata, but only exposes a fixed set of labels in metrics. Supporting this enhancement would require adding logic to the metrics collector to dynamically include user-specified pod label keys from additionalLabels in the CRD, fetching their values from the pod metadata, and annotating metrics accordingly.

SRodi avatar Jul 16 '25 06:07 SRodi