ITransaction already exposes a public timestamped startChild overload, but ISpan does not. Nested child spans (including Android extended app start via Sentry.getExtendedAppStartSpan()) therefore have no stable public way to set an explicit start time.
Current behavior
- Public on
ISpan: startChild(operation) and startChild(operation, description) only
- Public on
ITransaction: startChild(operation, description, timestamp)
- Overloads that set child start time on
ISpan (SpanOptions, SentryDate + Instrumenter, etc.) are @ApiStatus.Internal
- Public end-time control already exists on
ISpan: finish(status, timestamp)
Sentry.getExtendedAppStartSpan() returns an ISpan, not the parent transaction
Gap
When custom timers are recorded off the originating thread (or otherwise deferred), span start is stamped at startChild() call time unless an explicit start timestamp is provided. That skews durations.
The public timestamped API exists one level up on ITransaction, but callers parenting under a nested span—including the extended app-start span—cannot use it without reaching for internal ISpan APIs. End timestamps can already be set publicly; start timestamps cannot.
Related history: #2507 (internal span options path), #3722 (SpanOptions made public), #3639 (start timestamp on create via options).
Proposed API (optional)
Mirror the existing public ITransaction overload on ISpan:
ISpan startChild(
@NotNull String operation,
@Nullable String description,
@Nullable SentryDate timestamp);
This is intentionally narrow: timestamp only. Not asking to promote Instrumenter overloads or idle/trim/scope-binding knobs, or to change getExtendedAppStartSpan()'s return type.
Requested by Sergio Lombana.
--
View Junior Session [Sentry]
ITransactionalready exposes a public timestampedstartChildoverload, butISpandoes not. Nested child spans (including Android extended app start viaSentry.getExtendedAppStartSpan()) therefore have no stable public way to set an explicit start time.Current behavior
ISpan:startChild(operation)andstartChild(operation, description)onlyITransaction:startChild(operation, description, timestamp)ISpan(SpanOptions,SentryDate+Instrumenter, etc.) are@ApiStatus.InternalISpan:finish(status, timestamp)Sentry.getExtendedAppStartSpan()returns anISpan, not the parent transactionGap
When custom timers are recorded off the originating thread (or otherwise deferred), span start is stamped at
startChild()call time unless an explicit start timestamp is provided. That skews durations.The public timestamped API exists one level up on
ITransaction, but callers parenting under a nested span—including the extended app-start span—cannot use it without reaching for internalISpanAPIs. End timestamps can already be set publicly; start timestamps cannot.Related history: #2507 (internal span options path), #3722 (
SpanOptionsmade public), #3639 (start timestamp on create via options).Proposed API (optional)
Mirror the existing public
ITransactionoverload onISpan:This is intentionally narrow: timestamp only. Not asking to promote
Instrumenteroverloads or idle/trim/scope-binding knobs, or to changegetExtendedAppStartSpan()'s return type.Requested by Sergio Lombana.
--
View Junior Session [Sentry]