Closed Bug 1578719 Opened 5 years ago Closed 5 years ago

glean_parser/probe_scraper disabled calculation is based on present, not the commit

Categories

(Data Platform and Tools :: Glean: SDK, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mdroettboom, Assigned: mdroettboom)

Details

(Whiteboard: [telemetry:glean-rs:m10])

Attachments

(2 files)

glean_parser determines if a metric has expired by checking its expired parameter against the current date, and setting the disabled parameter to True if it has expired. This is helpful for the regular use of glean_parser for generating code, since the metric is completely disabled at build time without any additional overhead.

When glean_parser is used inside of probe_scraper, however, the same behavior occurs, even when probe_scraper is extracting a historical revision from before the metric expired. Therefore, these metrics will be marked as disabled in all history entries, even it is wasn't disabled/expired at that time.

This may or may not be a problem, but it's surprising enough that it's probably worth mentioning here and getting some discussion going.

A proper solution probably involves injecting extra history entries on the expiration dates and calculating "disabled" based on the historical date not the current date.

Flags: needinfo?(fbertsch)

Thanks for the ping, Mike. This is surprising behavior from the probe-scraper perspective, but makes sense from the client-engineering side.

I think initially I would like a way to disable this behavior altogether, and we can decide down-the-line if we want to add in disabled metrics.

Flags: needinfo?(fbertsch)

(In reply to Frank Bertsch [:frank] from comment #1)

I think initially I would like a way to disable this behavior altogether, and we can decide down-the-line if we want to add in disabled metrics.

Hey Frank, what's the correct behaviour you'd like, here? Do you have a desired timeline for that?

Flags: needinfo?(fbertsch)

We currently use parse_objects to get the metric definitions. What I'd like is a parameter to that function that indicates we don't want any special behavior for disabled metrics.

In the end what I'd like to see is disabled as another field within the metric, such that the history shows: [{..definition.., disabled: False}, {...definition..., disabled: True}]. There will be a tiny bit of work for the probe-scraper to compare that field over time, but easy to do.

Thoughts on making this available, Mike?

Flags: needinfo?(fbertsch) → needinfo?(mdroettboom)
Whiteboard: [telemetry:glean-rs:m?] → [telemetry:glean-rs:m10]

That should be easy enough to do.

Flags: needinfo?(mdroettboom)
Assignee: nobody → mdroettboom
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: