Open
Description
Feature Request
I would like a way for metrics to be nameable at runtime.
Motivation
With the current API, I don't believe you can pass in a metric name which is determined at runtime. This is fully within the realm of possibility when using the OpenTelemtry API, so it would be reasonable for this crate to support that somehow.
Proposal
I assume the most reasonable way might be a reserved field name for the metric name and metric value. However, I am not sure how this would interact with the existing interface.
Below is something like what I just described, but if there is any better way I'd prefer that. I just don't know how much flexibility or control we have here as we are using the tracing macros.
info!(metric.name = format!("histogram.{my_string}"), metric.value = 5)
Metadata
Metadata
Assignees
Labels
No labels