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

rfc(feature): Pass Native SDKs Spans to Hybrid #131

Merged

Conversation

philipphofmann
Copy link
Member

@philipphofmann philipphofmann commented Feb 8, 2024

This RFC aims to find a solution for passing auto-instrumented native SDK spans up to the hybrid SDKs.

Rendered RFC

@philipphofmann philipphofmann force-pushed the rfc/rfcfeature-native-to-hybrid-sdk-spans-passing branch from e5988da to 5f77cf2 Compare February 8, 2024 08:37
@philipphofmann philipphofmann changed the title rfc(feature): rfc(feature): Native to Hybrid SDK Spans Passing rfc(feature): Native to Hybrid SDK Spans Passing Feb 8, 2024
@philipphofmann philipphofmann changed the title rfc(feature): Native to Hybrid SDK Spans Passing rfc(feature): Pass Native SDKs Spans to Hybrid Feb 8, 2024
Copy link
Contributor

@brustolin brustolin left a comment

Choose a reason for hiding this comment

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

I like option number 3, it feels more versatile.

text/0131-pass-native-sdk-spans-to-hybrid.md Outdated Show resolved Hide resolved
text/0131-pass-native-sdk-spans-to-hybrid.md Show resolved Hide resolved
Copy link
Member

@kahest kahest left a comment

Choose a reason for hiding this comment

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

This is an intriguing topic - I added some clarifying questions, feel free to point out if/when something is not relevant for this RFC

text/0131-pass-native-sdk-spans-to-hybrid.md Outdated Show resolved Hide resolved
text/0131-pass-native-sdk-spans-to-hybrid.md Show resolved Hide resolved
text/0131-pass-native-sdk-spans-to-hybrid.md Show resolved Hide resolved
text/0131-pass-native-sdk-spans-to-hybrid.md Outdated Show resolved Hide resolved

### Pros <a name="option-3-pros"></a>

1. This option works well with idle transactions and `waitForChildren` because these concepts need to
Copy link
Member

Choose a reason for hiding this comment

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

is this a clear advantage over the aggregate callback when all spans are finished outlined for option 2?

text/0131-pass-native-sdk-spans-to-hybrid.md Show resolved Hide resolved
@krystofwoldrich
Copy link
Member

Option 2 looks to me the best as no span will be lost and the communication over the bridge is kept at a minimum.

actual native operations take. It could happen that one DB query from the hybrid layer gets
converted into multiple native DB queries. Such information would be insightful for our users.
Furthermore, there could be native-only operations that our hybrid SDKs currently don't capture. Therefore,
we want to pass native spans up to the native layers so users know what's happening on the native layer.
Copy link
Member

Choose a reason for hiding this comment

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

in a world of ingesting only spans, do we need to pass them across layers?
Would it dumping straight to the transport be enough while having them on the same trace?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's an excellent question. We want to establish a parent-child relationship between some spans, which works best when passing spans from native to RN because, on the backend, it's tricky if the spans don't arrive there in the same envelope. I will update the RFC to explain this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added your suggestion as option 4. Feel free to directly commit pros and cons, @bruno-garcia.

@philipphofmann philipphofmann marked this pull request as ready for review February 23, 2024 09:29
Copy link
Member

@kahest kahest left a comment

Choose a reason for hiding this comment

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

Thanks everyone for contributing!

text/0131-pass-native-sdk-spans-to-hybrid.md Outdated Show resolved Hide resolved
@philipphofmann philipphofmann merged commit 8e620f9 into main Mar 1, 2024
1 check passed
@philipphofmann philipphofmann deleted the rfc/rfcfeature-native-to-hybrid-sdk-spans-passing branch March 1, 2024 09:45
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.

None yet

5 participants