eclipse / microprofile-metrics

microprofile-metrics
Apache License 2.0
100 stars 66 forks source link

Update/Fix `PROM_APP_LABEL_REGEX` #734

Open Channyboy opened 2 years ago

Channyboy commented 2 years ago

Update PROM_APP_LABEL_REGEX from "mp_app=\"[-/A-Za-z0-9]+\"" to something that appropriately reflects the possible tag values.

Either updates regex or use logic for parsing. Perhaps using mp_app=".*(?<!\\\\)", may work.

Tag values are any character that is UTF-8.

This current regex was an artifact from Metrics 2.0 when the (mp)_app value was supposed to be (optionally) resolved from the context-root of the application.