alloy
alloy copied to clipboard
[feature request] spannmetrics filtering
Is your proposal related to a problem? context: we're using grafana agent to route a subset of traces to grafana cloud and to calculate spannmetrics. We don't control the code generating the spans, only the configuration (sampling/logging/metrics) of grafana agent.
problem: since we don't control span metric we can't make sure that some unique data (I.E span.name) will not be generated, this results in both high memory usage on the agent side and generating high cardinality data on the metrics.
Describe the solution you'd like I would like to be able to choose what spans are used in spannmetrics calculations
Describe alternatives you've considered currenly we're dropping the unwanted metrics on remote_write but there's still the issue of high memory usage by the agent
Additional context none
It sounds like an interesting idea; I'm trying to understand if the same effect could be achieved by using the attributesprocessor to drop the high-cardinality attributes before the spanmetrics are reported.
Do you think that could also work, or would you need the full set of attributes reported either way?