Closed Bug 2052480 Opened 2 months ago Closed 2 months ago

glean_parser: Common Prefix lint can lead to unwanted outcome

Categories

(Data Platform and Tools :: Glean: SDK, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: janerik, Assigned: janerik)

References

Details

Attachments

(1 file)

We currently have the common prefix lint.
It checks for a common prefix in all metrics under a certain category.

Unfortunately following that lint can lead to unwanted/unsupported outcomes, see for example https://github.com/mozilla/glam/issues/3526
A metric was changed like this:

- search:
-   suggestions_latency:
+ search.suggestions:
+   latency:

This was because they also added another metric, that fit well into the search.suggestions category.
For Glean client-side tooling this was all ok. The full ID is search.suggestions_latency for the old name, and search.suggestions.latency for the new.
However in the database we normalize this: dots (.) become underscores (_), thus turning both into search_suggestions_latency in the database column as well as as the identifier used in URLs like GLAM.

This breaks things.
Unfortunately the best we can do at the moment is to NOT suggest this change.


Notably other case: The lint only triggers when all metrics under a category have the same prefix. So e.g. removing a metric could lead to it triggering for all the other metrics.

Assignee: nobody → jrediger
Status: NEW → ASSIGNED
Type: defect → enhancement
Priority: P3 → P2
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Whiteboard: [telemetry:glean-rs:m?]
Blocks: 2055168
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: