-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Instantiate continuous profiling v8 (p3) #3725
base: feat/continuous-profiling-part2
Are you sure you want to change the base?
Instantiate continuous profiling v8 (p3) #3725
Conversation
removed isProfilingEnabled from AndroidContinuousProfiler, as it's useless added continuous profiler to SentryOptions
…ontinuous-profiling-part3 # Conflicts: # sentry/src/main/java/io/sentry/SentryTracer.java # sentry/src/test/java/io/sentry/OutboxSenderTest.kt
…iler updated DefaultTransactionPerformanceCollector to work with string ids other than transactions fixed ProfileChunk measurements being modifiable from other code added thread id and name to SpanContext.data
|
Performance metrics 🚀
|
sentry/src/main/java/io/sentry/TransactionPerformanceCollector.java
Outdated
Show resolved
Hide resolved
@@ -119,6 +126,14 @@ public SpanContext(final @NotNull SpanContext spanContext) { | |||
if (copiedUnknown != null) { | |||
this.unknown = copiedUnknown; | |||
} | |||
this.instrumenter = spanContext.instrumenter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just wanna check with @adinauer if this was just missed, or intended to not copy those?
@@ -86,6 +86,12 @@ public SentryTracer( | |||
this.baggage = new Baggage(scopes.getOptions().getLogger()); | |||
} | |||
|
|||
final @NotNull SentryId continuousProfilerId = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a thought: I'd imagine this would be better living on the Scope(s), but since it's a global profiler it's probably fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but one comment about where we send profiler_id
:
- I don't know about backend implications, but why don't we make
profiler_id
part of the baggage/trace-header? I'd imagine it'd make sense to have it there to make sampling decisions for spans/txs etc etc, or is it already supposed to work with spans-without-sampling? Just did the same thing for replays recently, that's why I'm asking, because there it differs from this approach a little.
…rofiling-part3 # Conflicts: # sentry-android-core/src/main/java/io/sentry/android/core/AndroidContinuousProfiler.java # sentry-android-core/src/main/java/io/sentry/android/core/AndroidOptionsInitializer.java # sentry-android-ndk/build.gradle.kts # sentry/api/sentry.api # sentry/src/main/java/io/sentry/Scopes.java # sentry/src/main/java/io/sentry/SpanContext.java # sentry/src/main/java/io/sentry/protocol/SentryTransaction.java # sentry/src/test/java/io/sentry/CheckInSerializationTest.kt # sentry/src/test/java/io/sentry/JsonSerializerTest.kt # sentry/src/test/java/io/sentry/SentryOptionsTest.kt # sentry/src/test/java/io/sentry/protocol/SpanContextSerializationTest.kt
Chunks are not bound to traces at the moment, but I agree on your thoughts. |
📜 Description
added profile context to SentryTracer
removed isProfilingEnabled from AndroidContinuousProfiler, as it's useless
added continuous profiler to SentryOptions
added DefaultTransactionPerformanceCollector to AndroidContinuousProfiler and updated it to work with string ids other than transactions
fixed ProfileChunk measurements being modifiable from other code
added thread id and name to SpanContext.data
#skip-changelog
💡 Motivation and Context
Instantiate Continuous Profiler
Part 3 of #3710
💚 How did you test it?
Unit tests
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps