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

Consider adding richer metadata to metric emission. #370

Closed
tobz opened this issue May 12, 2023 · 1 comment · Fixed by #380
Closed

Consider adding richer metadata to metric emission. #370

tobz opened this issue May 12, 2023 · 1 comment · Fixed by #380
Labels
C-core Component: core functionality such as traits, etc. E-complex Effort: complex. T-enhancement Type: enhancement. T-ergonomics Type: ergonomics.

Comments

@tobz
Copy link
Member

tobz commented May 12, 2023

In #338, it was mentioned/implied that metric filtering is harder than it needs to be due to a lack of first-class metadata, such as what tracing provides in its "callsite metadata". This includes high-level things like log level, but also target, module path, and so on.

These additional metadata properties allow users to efficiently filter out, for example, all spans/events from a specific crate or module. In contrast, with metrics, at best, we can filter by metric name and/or labels, which is precarious and involves a priori knowledge of exactly what we want to filter.. whereas tracing's approach can allow (at least far more easily) for filtering via allowlist rather than blocklist.

We should consider what a design might look like to bring this same callsite metadata to metrics.

The primary concerns would roughly be:

  • what data should be included? (crate/module path seem obvious, but would "level" make sense?)
  • should this data be passed alongside Key or baked into it?
@tobz
Copy link
Member Author

tobz commented May 12, 2023

/cc @hlbarber @LukeMathWalker

@tobz tobz added C-core Component: core functionality such as traits, etc. E-complex Effort: complex. T-enhancement Type: enhancement. T-ergonomics Type: ergonomics. labels May 12, 2023
@hlbarber hlbarber mentioned this issue Jun 6, 2023
3 tasks
@tobz tobz closed this as completed in #380 Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-core Component: core functionality such as traits, etc. E-complex Effort: complex. T-enhancement Type: enhancement. T-ergonomics Type: ergonomics.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant