Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

JoshuaMoelans
Copy link
Member

@JoshuaMoelans JoshuaMoelans commented Apr 15, 2025

Related to the investigation of #1167

The aim of this PR is to rework the way we handle trace syncing (e.g. with set_trace) and how this affects data inside events & spans.

There's ToDos left in the code to indicate some parts of the implementation left to discuss.

#skip-changelog for now

@JoshuaMoelans JoshuaMoelans self-assigned this Apr 17, 2025
@JoshuaMoelans JoshuaMoelans marked this pull request as ready for review May 6, 2025 12:09
@JoshuaMoelans JoshuaMoelans changed the title fix: trace sync improvements (draft) fix: trace sync improvements May 6, 2025
Copy link
Collaborator

@supervacuus supervacuus left a comment

Choose a reason for hiding this comment

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

This looks good! Thanks, @JoshuaMoelans. Do you still want to add integration tests for some of the modelled use cases, or do you think the unit tests cover things well enough?

Have you tried to run this inside sentry-android (using a local version of the ndk package)?

@JoshuaMoelans
Copy link
Member Author

I think integration tests make sense; currently the unit tests only ensure that spans get created properly, not that they leave the native SDK with the expected values. I will add those before merging 👍

Local testing with sentry-android seems very promising, as now transactions/spans are trace-connected to the Android layer running above.

JoshuaMoelans added a commit to getsentry/sentry-docs that referenced this pull request May 9, 2025
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

[vercel
preview](https://develop-docs-git-feat-nativetracingoverview.sentry.dev/sdk/platform-specifics/native-sdks/tracing/)

## DESCRIBE YOUR PR
Related to getsentry/sentry-native#1200 where we
reworked the way the Sentry Native SDK handles tracing.

Todo
- [x] introductory text
- [x] add visualizations

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

---------

Co-authored-by: Mischan Toosarani-Hausberger <[email protected]>
Co-authored-by: Mischan Toosarani-Hausberger <[email protected]>
JoshuaMoelans added a commit to getsentry/sentry-docs that referenced this pull request May 13, 2025
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

[Vercel
Preview](https://sentry-docs-htn2uy3fb.sentry.dev/platforms/native/tracing/instrumentation/custom-instrumentation/#:~:text=it%20to%20Sentry.-,By%20default%2C,-transactions%20will%20inherit)

## DESCRIBE YOUR PR
Related to the feature added in
getsentry/sentry-native#1137 & the update to
native tracing in getsentry/sentry-native#1200

Since transactions no longer create a new `trace_id`, we want to
document how to set up a trace boundary with `sentry_set_trace()`.

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
@JoshuaMoelans JoshuaMoelans merged commit bbca52a into master May 13, 2025
33 checks passed
@JoshuaMoelans JoshuaMoelans deleted the joshua/feat/trace_sync_improvements branch May 13, 2025 09:26
bitsandfoxes pushed a commit to getsentry/sentry-docs that referenced this pull request Jul 3, 2025
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

[vercel
preview](https://develop-docs-git-feat-nativetracingoverview.sentry.dev/sdk/platform-specifics/native-sdks/tracing/)

## DESCRIBE YOUR PR
Related to getsentry/sentry-native#1200 where we
reworked the way the Sentry Native SDK handles tracing.

Todo
- [x] introductory text
- [x] add visualizations

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

---------

Co-authored-by: Mischan Toosarani-Hausberger <[email protected]>
bitsandfoxes pushed a commit to getsentry/sentry-docs that referenced this pull request Jul 3, 2025
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

[Vercel
Preview](https://sentry-docs-htn2uy3fb.sentry.dev/platforms/native/tracing/instrumentation/custom-instrumentation/#:~:text=it%20to%20Sentry.-,By%20default%2C,-transactions%20will%20inherit)

## DESCRIBE YOUR PR
Related to the feature added in
getsentry/sentry-native#1137 & the update to
native tracing in getsentry/sentry-native#1200

Since transactions no longer create a new `trace_id`, we want to
document how to set up a trace boundary with `sentry_set_trace()`.

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
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.

2 participants