Skip to content

Commit 69ee9eb

Browse files
feat(core): Make ISpan startChild SpanOptions overloads public (#5927)
* feat(core): Make ISpan startChild SpanOptions overloads public Unmark the SpanOptions-based startChild overloads on ISpan so callers can set an explicit start timestamp without using internal API. Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io> * changelog Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
1 parent 983e0f0 commit 69ee9eb

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Features
6+
7+
- Make `ISpan.startChild` overloads with `SpanOptions` public ([#5927](https://github.com/getsentry/sentry-java/pull/5927))
8+
59
### Fixes
610

711
- Clear contexts when calling `Scope.clear()` ([#5902](https://github.com/getsentry/sentry-java/pull/5902))

‎sentry/src/main/java/io/sentry/ISpan.java‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,25 @@ public interface ISpan {
1717
@NotNull
1818
ISpan startChild(@NotNull String operation);
1919

20-
@ApiStatus.Internal
20+
/**
21+
* Starts a child Span.
22+
*
23+
* @param operation - new span operation name
24+
* @param description - new span description name
25+
* @param spanOptions - options for the newly created span, e.g. an explicit start timestamp
26+
* @return a new transaction span
27+
*/
2128
@NotNull
2229
ISpan startChild(
2330
@NotNull String operation, @Nullable String description, @NotNull SpanOptions spanOptions);
2431

25-
@ApiStatus.Internal
32+
/**
33+
* Starts a child Span.
34+
*
35+
* @param spanContext - the context for the newly created span
36+
* @param spanOptions - options for the newly created span, e.g. an explicit start timestamp
37+
* @return a new transaction span
38+
*/
2639
@NotNull
2740
ISpan startChild(@NotNull SpanContext spanContext, @NotNull SpanOptions spanOptions);
2841

0 commit comments

Comments
 (0)