-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Extract attribute values from a span to generate a new metric #26628
Comments
Pinging code owners for connector/spanmetrics: @albertteoh. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hello @ssidhu-apm, sorry for the delay. I'm not sure the From the README's overview:
It looks like your request is a more general functionality approach of being able to generate any kind of new metric from incoming trace data. Can you share some more context for your request here? In general, metric receivers should be used to get metrics from whatever source is necessary. Do you have a specific scenario where a receiver can't accomplish what you're trying to do? |
Hello @ssidhu-apm, without more information we can't really make progress on this enhancement request. I'm going to close this issue for now, but please feel free to reopen and add more information, we'd be happy to help! |
I missed the previous updated. Sorry about that. The use-case is to extract metadata as a metric at the collector and send it to a metrics endpoint. If there is another processor option to extract metadata from spans, please do let me know. In the example I shared: |
Looks like I cannot reopen the issue @crobert-1 . Is that something you could do? |
I'll have to defer to @albertteoh as he'd be the best person to validate this use case for the span metrics connector. |
Thanks @crobert-1. Yeah, I agree with you, spanmetrics connector wasn't designed for emitting metrics of individual spans' attribute values, but instead is designed specifically to aggregate the number of occurrences of spans with common attributes. @ssidhu-apm I'm not aware of other alternative components that can meet your requirements. Have you tried asking in the #opentelemetry/#otel-collector slack channels or SIG groups? |
I'll preface by saying that I'm not super familiar with the project structure, and don't really care where this is implemented as long as it's something that's possible. Is there a repo for general feature requests/user story kind of issues that might be better suited? This is something we'd really like to have as well. One of the values of opentelemetry for us is the automatic instrumentation across a large number of libraries. If we could leverage this to almost automatically (with some collector configuration) generate metrics as well that would be a huge help. |
I think the best path forward is probably to propose a new connector component with this functionality. |
I'm going to close this issue for now, feel free to reference in a new issue for context. |
Component(s)
No response
Is your feature request related to a problem? Please describe.
Assume there is a span with the following data:
name = order.data
service = my.service
location = IN
revenue = 42
status = OK
I'd like to use this span to extract metric data and send it via a metrics exporter.
datapoint = 42
metric.name = order.data
location = IN
I'd like the option to drop the span or retain it in the trace exporter at this stage.
Describe the solution you'd like
Extrapolating the
spanmetricsconnector
to extract an attribute value from the span to generate the data point from the metric.Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: