Ability to prefiix metrics from spanmetrics processor #18679
Labels
enhancement
New feature or request
needs triage
New item requiring triage
processor/spanmetrics
Span Metrics processor
Component(s)
processor/spanmetrics
Is your feature request related to a problem? Please describe.
Feature request to add an arbitrary prefix to metric names emitted by spanmetrics processor.
Currently with the 4 metric names set as
calls_total
,latency_bucket
,latency_count
, andlatency_sum
become harder to utilize and organize when spanmetrics processor is used for more than one source of data as they all get folded into the same 4 metrics.Would like to be able to prefix metric names for ease of use and organization (E.G.
cicd_calls_total
)Describe the solution you'd like
ability to add a prefix (or fully rename) metrics emitted by spanmetrics processor.
Suggest prefixing to keep the
calls_total
,latency_bucket
,latency_count
, andlatency_sum
pattern intact.Something like adding a config value (E.G.
metric_name_prefix: prefixstring_
) that would then prefix metrics such thatcalls_total
would becomeprefixstring_calls_total
along withprefixstring_latency_bucket
and so on.Without the ability to name metrics differently using the spanmetrics processor more than once quickly leads to a very large number of dimensions on the emitted metrics which may or may not be related and lead to confusion.
Describe alternatives you've considered
Ability to fully rename metrics using transform processors.
Have tried renaming with transform processor and metrics transform processor without success on spanmetrics emitted metrics. While I was able to rename standard metrics and transform them as expected, I was not able to rename or transform spanmetrics emitted metrics. I believe this is due to the nature of spanmetrics metrics creation and feed to exporter.
Additional context
I'm happy to contribute code for this feature request.
The text was updated successfully, but these errors were encountered: