Skip to content

[exporter/sentryexporter] Omit empty parent span id #13415

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

Conversation

Loddan
Copy link
Contributor

@Loddan Loddan commented Aug 18, 2022

Description:
When events without a parent span id is sent to Sentry, the trace context parent span id will have a value of 0000000000000000 when the parent span id field should be omitted if empty. This is because when sentry.TraceContext is added to the event context it is not a pointer, thus the custom MarshalJSON() func of sentry.TraceContext (with pointer receiver) is not used.
This PR changes the sentry.TraceContext form value to pointer when added to the event context.

Link to tracking Issue:

Testing:
Added tests to confirm that the event is marshalled properly with and without a parent span id.

Documentation:

@Loddan Loddan requested review from a team and djaglowski August 18, 2022 13:45
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 18, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2022

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Sep 3, 2022
@AbhiPrasad
Copy link
Member

@djaglowski @codeboten I think this is good to merge in!

@github-actions github-actions bot removed the Stale label Sep 8, 2022
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codeboten codeboten merged commit 40bb1ee into open-telemetry:main Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants