-
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
[spanmetricsprocessor] All metrics extracted from spans has the same resource attributes, despite the spans' resources are different #6486
Comments
@albertteoh, are you interested in looking into this? |
Yup, I can take a look at this. |
hey @albertteoh, I wonder have you got a chance to check this? |
At a high-level, this makes sense to me. Please go ahead and create the PR when you get the chance (assuming you were planning to create one in otel-contrib based on your draft). |
I've kind of lost track of what happened here. The support for Resource Attributes that was added in this PR seems to have been removed without any reference. Is the conclusion that adding resource attributes required aggregating the metrics into different groups as specified in comment #403 (comment) ? I am here because of a similar reason - I was looking for the instrumentation scope which is lost. Is there any chance we can add that as a dimension via configuration? |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Signed-off-by: Bogdan <bogdandrutu@gmail.com> Signed-off-by: Bogdan <bogdandrutu@gmail.com>
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
@hstan the |
Describe the bug
In the span metrics processor, all metrics extracted from spans are sharing the same resource, even when the spans have different resources. (https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/spanmetricsprocessor/processor.go#L234).
This only makes sense when there's no resource labels on the metrics. Once we decided to attach resource labels to metrics based on spans resource, this all-metrics-under-same-resource approach seems to be incorrect.
What did you expect to see?
When processing
spanA
(under span resource A) andspanB
(under span resource B), the metrics created should be under metrics resource A and metrics resource BWhat did you see instead?
All metrics created are under the same empty metrics resource.
Additional context
The following PR is an experiment to extract resource from spans and attach to generated metrics, which is when we found the issue. It also changed the way the
buildMetrics
function works to meet our expectations.https://github.com/atlassian-forks/opentelemetry-collector-contrib/pull/1184/files
The text was updated successfully, but these errors were encountered: