prometheus/web
Arthur Silva Sens 2c04f2d7b1
PROM-39: Add type and unit labels to OTLP endpoint (#16630)
* PROM-39: Add type and unit labels to OTLP endpoint

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Extract label addition into helper function

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Wire feature flag and web handler configuration

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Apply suggestions from code review

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Use lowercase for units too

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Use otlptranslator.UnitNamer to build units

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Address copilot's comment

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Verify label presence before adding them

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Overwrite type/unit labels when already set

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* sed/addTypeAndUnitLabels/enableTypeAndUnitLabels/

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Reduce duplicated code

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

---------

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-07-25 08:53:13 -03:00
..
api/v1 PROM-39: Add type and unit labels to OTLP endpoint (#16630) 2025-07-25 08:53:13 -03:00
ui UI: More inclusive metadata handling for _count/_sum/_bucket suffixes (#16910) 2025-07-24 13:54:58 +02:00
federate_test.go feature: type-and-unit-labels (PROM-39 implementation) (#16228) 2025-05-17 09:37:25 +00:00
federate.go feature: type-and-unit-labels (PROM-39 implementation) (#16228) 2025-05-17 09:37:25 +00:00
web_test.go Fix linting issues found by golangci-lint v2.0.2 (#16368) 2025-05-03 19:05:13 +02:00
web.go PROM-39: Add type and unit labels to OTLP endpoint (#16630) 2025-07-25 08:53:13 -03:00