Skip to content
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

[BUG] TelemetryItem tag ai.operation.parentId not set when Activity.Parent is null when Activity.ParentSpanId is defined #20433

Closed
mangeg opened this issue Apr 15, 2021 · 1 comment · Fixed by #20434
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@mangeg
Copy link
Contributor

mangeg commented Apr 15, 2021

Describe the bug
When starting a new Activity with passing a parent ActivityContext that has ParentSpanId set the Parent property on Activity is null while the ParentSpanId is set.
In the current implementation the Activity.ParentSpanId is not used and that results in the TelemetryItem not having the tag ai.operation.parentId set.

Examples when this happens is if one or more activities are not part of the ActivitySource that is being monitored. Then the started activities has the parent set manually from ActivityContext to maintain the link between them regarding parents.

Expected behavior
The ai.operation.parentId tag should be set when Activity.ParentSpanId is set

Actual behavior (include Exception or Stack Trace)
The ai.operation.parentId is not set when the Activity is created with a ActivityContext passed as the Parent property is null

To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)

  1. Create a ActivitySource
  2. Start a Activity from the ActivitySource
  3. Start another Activity from the ActivitySource but this time pass a ActivityContext with the TraceId and SpanId set to the previous Activity's TraceId and SpanId
  4. When transmitted the 2nd Activity produces a TelemetryItem with ai.operation.id set but without ai.operation.parentId set.

Environment:

  • Name and version of the Library package used: Azure.Monitor.OpenTelemetry.Exporter 1.0.0-beta.2
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Apr 15, 2021
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. labels Apr 15, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Apr 15, 2021
@jsquire
Copy link
Member

jsquire commented Apr 15, 2021

Thank you for your feedback. Tagging and routing to the team best able to assist.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Exporter Monitor OpenTelemetry Exporter needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants