Upper Case Custom Labels not accepting.

Description

While adding a remote MySQL Instance then we are unable to add the Upper-case custom Labels, but lower-case custom labels are working fine.

 

Upper Case:

Lower Case:

 

How to test

FB: https://github.com/Percona-Lab/pmm-submodules/pull/3354#issuecomment-1662407463

Custom labels field should now accept keys and values based on prometheus guidelines. 

https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels.

In short keys must match following regex [a-zA-Z_][a-zA-Z0-9_]*, value can contain any unicode characters. In our case spaces (used to separe labels) and colons (used as key/value separator) are disallowed in values.

How to document

None

Attachments

5
  • 02 Aug 2023, 05:40 PM
  • 02 Aug 2023, 05:39 PM
  • 02 Aug 2023, 09:22 AM
  • 02 Aug 2023, 09:14 AM
  • 02 Aug 2023, 09:14 AM

Activity

Show:

saikumar.vs August 22, 2023 at 2:54 PM

verified, refer testcase section for more info.

Naresh August 3, 2023 at 9:55 AM

Great news! Many thanks for the fix.

Roma Novikov August 3, 2023 at 9:08 AM

, Prom limitations - is exactly what I would expect here, as we use labels the same way Prom uses so  - This is The way) 

, you got lucky, as we just discussed the same topic in the context of another task we are working on, so this was easy to fix while we were on track.  

Post likely pmm 2.40, this fix will be landed.  

Naresh August 2, 2023 at 5:42 PM

 

Thanks so much for the quick fix.

I have missed the below scenarios. Even if I use _ or - then it's not allowing to create the custom labels.

EX1: test-test:test

EX: test_test:test

Matej Kubinec August 2, 2023 at 2:34 PM

 

Restrictions will be set based on the prometheus data model - https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels.

In short keys must match following regex [a-zA-Z_][a-zA-Z0-9_]*, value can contain any unicode characters. In our case spaces (are used to separe labels) and colons (used as key/value separator) are disallowed in values.

Done

Details

Assignee

Reporter

Priority

Components

Needs QA

Yes

Needs Doc

No

Planned Version/s

Fix versions

Story Points

Smart Checklist

Created August 2, 2023 at 9:21 AM
Updated March 5, 2024 at 10:14 PM
Resolved August 23, 2023 at 11:01 AM

Flag notifications