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

Add OTEL propagator #2380

Merged
merged 4 commits into from Nov 28, 2022
Merged

Add OTEL propagator #2380

merged 4 commits into from Nov 28, 2022

Conversation

adinauer
Copy link
Member

@adinauer adinauer commented Nov 21, 2022

#skip-changelog

📜 Description

Add SentryPropagator, register it and use it by default in the Sentry Java Agent JAR.

💡 Motivation and Context

Continue traces (via sentry-trace and baggage headers) by extracting headers from incoming requests and using that info for Span/Transaction creating as well as injecting headers into outgoing requests.

💚 How did you test it?

Manually

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2022

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 57f2656

@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2022

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 350.22 ms 379.98 ms 29.76 ms
Size 1.73 MiB 2.32 MiB 610.45 KiB

Baseline results on branch: feat/otel-context

Startup times

Revision Plain With Sentry Diff
4241258 299.25 ms 333.24 ms 33.99 ms
8baf861 345.27 ms 366.88 ms 21.61 ms

App size

Revision Plain With Sentry Diff
4241258 1.73 MiB 2.32 MiB 610.41 KiB
8baf861 1.73 MiB 2.32 MiB 610.41 KiB

This was referenced Nov 21, 2022
@@ -131,7 +131,8 @@ private ITransaction startTransaction(
TransactionNameSource.URL,
"http.server",
new SentryTraceHeader(sentryTraceHeader),
baggage);
baggage,
null);
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be covered by the method overload without spanId?

Copy link
Member Author

@adinauer adinauer Nov 28, 2022

Choose a reason for hiding this comment

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

I added another param (spanId) to it. The other overload doesn't have baggage so can't be used here. I didn't want to introduce yet another overload for something that's only used internally anyways. Eventually I'd like to improve this by e.g. introducing a param object that has defaults which can be overriden.

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

I think we might need some more tests, but I'm happy with where this is for now for an alpha!

Let's :shipit:

@adinauer
Copy link
Member Author

I think we might need some more tests

Yes, indeed. It hurts a little to have not tests yet 😢 . Was already on my list of next things to do. Added it as explicit item to #2327 now.

@adinauer adinauer merged commit 93b327f into feat/otel-context Nov 28, 2022
@adinauer adinauer deleted the feat/otel-propagator branch November 28, 2022 10:26
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

3 participants