feat(otel): Create sentry-opentelemetry-otlp module for combining OpenTelemetry SDK OTLP export with Sentry SDK#5100
Conversation
Contributor
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
🤖 This preview updates automatically when you update the PR. |
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| d15471f | 315.61 ms | 360.22 ms | 44.61 ms |
| 6edfca2 | 314.02 ms | 383.20 ms | 69.18 ms |
| d217708 | 375.27 ms | 415.68 ms | 40.41 ms |
| a5ab36f | 320.47 ms | 389.77 ms | 69.30 ms |
| d217708 | 355.34 ms | 381.39 ms | 26.05 ms |
| 319f256 | 317.53 ms | 370.83 ms | 53.29 ms |
| 6405ec5 | 310.88 ms | 354.56 ms | 43.69 ms |
| ce0a49e | 532.00 ms | 609.96 ms | 77.96 ms |
| dba088c | 365.46 ms | 366.31 ms | 0.85 ms |
| 889ecea | 367.58 ms | 437.52 ms | 69.94 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| d15471f | 1.58 MiB | 2.13 MiB | 559.54 KiB |
| 6edfca2 | 1.58 MiB | 2.13 MiB | 559.07 KiB |
| d217708 | 1.58 MiB | 2.10 MiB | 532.97 KiB |
| a5ab36f | 1.58 MiB | 2.12 MiB | 555.26 KiB |
| d217708 | 1.58 MiB | 2.10 MiB | 532.97 KiB |
| 319f256 | 1.58 MiB | 2.19 MiB | 619.79 KiB |
| 6405ec5 | 1.58 MiB | 2.12 MiB | 552.23 KiB |
| ce0a49e | 1.58 MiB | 2.10 MiB | 532.94 KiB |
| dba088c | 1.58 MiB | 2.13 MiB | 558.99 KiB |
| 889ecea | 1.58 MiB | 2.11 MiB | 539.75 KiB |
Previous results on branch: feat/otlp
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2df4164 | 367.39 ms | 443.00 ms | 75.61 ms |
| 53c2fc4 | 309.78 ms | 365.36 ms | 55.58 ms |
| e60f0df | 302.47 ms | 363.00 ms | 60.53 ms |
| 9ac2f6b | 320.28 ms | 367.77 ms | 47.49 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2df4164 | 1.58 MiB | 2.29 MiB | 719.82 KiB |
| 53c2fc4 | 1.58 MiB | 2.29 MiB | 719.83 KiB |
| e60f0df | 1.58 MiB | 2.29 MiB | 719.82 KiB |
| 9ac2f6b | 1.58 MiB | 2.29 MiB | 719.82 KiB |
adinauer
commented
Feb 23, 2026
| @@ -0,0 +1,122 @@ | |||
| package io.sentry.opentelemetry.otlp; | |||
| @@ -0,0 +1,120 @@ | |||
| package io.sentry.opentelemetry.otlp; | |||
| properties.put("otel.logs.exporter", "none"); | ||
| properties.put("otel.metrics.exporter", "none"); | ||
| // OTLP traces exporter configuration | ||
| properties.put("otel.traces.exporter", "otlp,logging"); |
Member
Author
There was a problem hiding this comment.
👀 Example usage from plain Java + OTel SDK
|
|
||
| # OTEL configuration | ||
| # Use Sentry propagator to propagate sentry-trace and baggage headers | ||
| otel.propagators=tracecontext,baggage,sentry |
Member
Author
There was a problem hiding this comment.
👀 Spring Boot config example
| @@ -0,0 +1 @@ | |||
| io.sentry.samples.spring.boot4.otlp.SentryOtlpPropagatorProvider | |||
Member
Author
There was a problem hiding this comment.
👀 Spring Boot config example
| @@ -0,0 +1,18 @@ | |||
| package io.sentry.samples.spring.boot4.otlp; | |||
Member
Author
There was a problem hiding this comment.
👀 Spring Boot config example
| return trigger; | ||
| } | ||
|
|
||
| @Bean |
Member
Author
There was a problem hiding this comment.
👀 Spring Boot config example
sentry-opentelemetry-otlp module for comining OpenTelemetry SDK OTLP export with Sentry SDKsentry-opentelemetry-otlp module for comining OpenTelemetry SDK OTLP export with Sentry SDK
sentry-opentelemetry-otlp module for comining OpenTelemetry SDK OTLP export with Sentry SDKsentry-opentelemetry-otlp module for combining OpenTelemetry SDK OTLP export with Sentry SDK
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
sentry-opentelemetry-otlpmodule containing:OpenTelemetryOtlpPropagatorto use in OpenTelemetry SDK configOpenTelemetryOtlpEventProcessorto use in Sentry SDK config💡 Motivation and Context
Closes #5096 by implementing
Bfrom #5096 (comment)💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps