Description
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)andstartChild(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 anISpan, 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.
--
Activity
linear-code commentedon Aug 5, 2026
JAVA-684
feat(core): Add timestamped child spans to ISpan (#5929)
github-actions commentedon Aug 12, 2026
A PR closing this issue has just been released 🚀
This issue was referenced by PR #5929, which was included in the 8.53.0 release.