Remove debug logs when searching for OpenTelemetry marker classes#4091
Merged
Remove debug logs when searching for OpenTelemetry marker classes#4091
Conversation
Contributor
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 00c8eeb | 415.32 ms | 428.08 ms | 12.76 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 00c8eeb | 1.70 MiB | 2.36 MiB | 671.98 KiB |
Previous results on branch: feat/remove-debug-logs-for-loading-otel-classes
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 04af998 | 405.06 ms | 460.74 ms | 55.68 ms |
| 92de480 | 414.71 ms | 430.39 ms | 15.67 ms |
| 3411544 | 410.41 ms | 513.26 ms | 102.85 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 04af998 | 1.65 MiB | 2.31 MiB | 677.61 KiB |
| 92de480 | 1.65 MiB | 2.31 MiB | 677.59 KiB |
| 3411544 | 1.65 MiB | 2.31 MiB | 677.61 KiB |
lcian
reviewed
Jan 23, 2025
Comment on lines
+33
to
+41
| "io.sentry.opentelemetry.agent.AgentMarker", NoOpLogger.getInstance())) { | ||
| return SpanUtils.ignoredSpanOriginsForOpenTelemetry(SentryOpenTelemetryMode.AGENT); | ||
| } | ||
| if (loadClass.isClassAvailable( | ||
| "io.sentry.opentelemetry.agent.AgentlessMarker", options.getLogger())) { | ||
| "io.sentry.opentelemetry.agent.AgentlessMarker", NoOpLogger.getInstance())) { | ||
| return SpanUtils.ignoredSpanOriginsForOpenTelemetry(SentryOpenTelemetryMode.AGENTLESS); | ||
| } | ||
| if (loadClass.isClassAvailable( | ||
| "io.sentry.opentelemetry.agent.AgentlessSpringMarker", options.getLogger())) { | ||
| "io.sentry.opentelemetry.agent.AgentlessSpringMarker", NoOpLogger.getInstance())) { |
Member
There was a problem hiding this comment.
LGTM, let's add a way to log this information along with the OpenTelemetryMode to help debug customer issues in another PR
lcian
approved these changes
Jan 23, 2025
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
Use
NoOpLoggerforLoadClasswhen searching for OpenTelemetry marker classes to determine if Sentry OpenTelemetry dependencies / agent are present.💡 Motivation and Context
It's not a nice experience to start the SDK without OpenTelemetry and be greeted with a wall of stacktraces when
debugis enabled.💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps