Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1934880 - Provide a public interface so that consumers of glean's RLB can access metric identifiers #3054

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

AdamBrouwersHarries
Copy link
Contributor

We'd like to be able to access the name and label of a dynamic metric in FOG. To do this, glean-core's RLB needs to expose some way for us to actually access the underlying metadata. This PR adds a trait that does precisely this, and exports it through the RLB so that downstream consumers can access it.

@AdamBrouwersHarries AdamBrouwersHarries requested a review from a team as a code owner January 23, 2025 19:53
@AdamBrouwersHarries AdamBrouwersHarries requested review from rosahbruno and removed request for a team January 23, 2025 19:53
@chutten chutten requested review from chutten and removed request for rosahbruno January 23, 2025 20:17
@AdamBrouwersHarries AdamBrouwersHarries force-pushed the Bug1934880 branch 2 times, most recently from 0c44804 to 31cce47 Compare January 23, 2025 20:56
@AdamBrouwersHarries
Copy link
Contributor Author

@badboy Just to check, this is going to make it into today's release, right?

@badboy
Copy link
Member

badboy commented Jan 30, 2025

@badboy Just to check, this is going to make it into today's release, right?

:D yes!

Comment on lines 249 to 250
let meta = &self.meta().inner;
(&meta.name, meta.dynamic_label.as_deref())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually identify metrics by their full name (or "base_identifier" in our code), which is category.name (if category exists, which it does for all user metrics). Shouldn't we use the full name in the profiler too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point - we probably should! Right now, in the implementation, we get the name from FOG_GetMetricIdentifier, which uses gMetricStringTable internally. I think this doesn't include the category, but it would be useful indeed. I'll modify this method to also include the category in the name.

@badboy badboy merged commit 5e7064f into mozilla:main Jan 30, 2025
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants