Skip to content

Commit

Permalink
Merge f9cc298 into 2011dda
Browse files Browse the repository at this point in the history
  • Loading branch information
lbloder authored May 5, 2023
2 parents 2011dda + f9cc298 commit b91be82
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 2 deletions.
3 changes: 3 additions & 0 deletions sentry/api/sentry.api
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ public abstract interface class io/sentry/ITransaction : io/sentry/ISpan {
public abstract fun setContext (Ljava/lang/String;Ljava/lang/Object;)V
public abstract fun setName (Ljava/lang/String;)V
public abstract fun setName (Ljava/lang/String;Lio/sentry/protocol/TransactionNameSource;)V
public abstract fun startChild (Ljava/lang/String;Ljava/lang/String;Lio/sentry/SentryDate;)Lio/sentry/ISpan;
}

public abstract interface class io/sentry/ITransactionProfiler {
Expand Down Expand Up @@ -924,6 +925,7 @@ public final class io/sentry/NoOpTransaction : io/sentry/ITransaction {
public fun setThrowable (Ljava/lang/Throwable;)V
public fun startChild (Ljava/lang/String;)Lio/sentry/ISpan;
public fun startChild (Ljava/lang/String;Ljava/lang/String;)Lio/sentry/ISpan;
public fun startChild (Ljava/lang/String;Ljava/lang/String;Lio/sentry/SentryDate;)Lio/sentry/ISpan;
public fun startChild (Ljava/lang/String;Ljava/lang/String;Lio/sentry/SentryDate;Lio/sentry/Instrumenter;)Lio/sentry/ISpan;
public fun startChild (Ljava/lang/String;Ljava/lang/String;Lio/sentry/SentryDate;Lio/sentry/Instrumenter;Lio/sentry/SpanOptions;)Lio/sentry/ISpan;
public fun startChild (Ljava/lang/String;Ljava/lang/String;Lio/sentry/SpanOptions;)Lio/sentry/ISpan;
Expand Down Expand Up @@ -1916,6 +1918,7 @@ public final class io/sentry/SentryTracer : io/sentry/ITransaction {
public fun setThrowable (Ljava/lang/Throwable;)V
public fun startChild (Ljava/lang/String;)Lio/sentry/ISpan;
public fun startChild (Ljava/lang/String;Ljava/lang/String;)Lio/sentry/ISpan;
public fun startChild (Ljava/lang/String;Ljava/lang/String;Lio/sentry/SentryDate;)Lio/sentry/ISpan;
public fun startChild (Ljava/lang/String;Ljava/lang/String;Lio/sentry/SentryDate;Lio/sentry/Instrumenter;)Lio/sentry/ISpan;
public fun startChild (Ljava/lang/String;Ljava/lang/String;Lio/sentry/SentryDate;Lio/sentry/Instrumenter;Lio/sentry/SpanOptions;)Lio/sentry/ISpan;
public fun startChild (Ljava/lang/String;Ljava/lang/String;Lio/sentry/SpanOptions;)Lio/sentry/ISpan;
Expand Down
1 change: 0 additions & 1 deletion sentry/src/main/java/io/sentry/IHub.java
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@ ITransaction startTransaction(
return startTransaction(name, operation, null);
}

@ApiStatus.Internal
@NotNull
ITransaction startTransaction(
final @NotNull TransactionContext transactionContext,
Expand Down
4 changes: 4 additions & 0 deletions sentry/src/main/java/io/sentry/ITransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public interface ITransaction extends ISpan {
@TestOnly
List<Span> getSpans();

@NotNull
ISpan startChild(
@NotNull String operation, @Nullable String description, @Nullable SentryDate timestamp);

/**
* Returns if transaction is sampled.
*
Expand Down
5 changes: 5 additions & 0 deletions sentry/src/main/java/io/sentry/NoOpTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ public void setName(@NotNull String name, @NotNull TransactionNameSource transac
return Collections.emptyList();
}

@Override
public @NotNull ISpan startChild(@NotNull String operation, @Nullable String description, @Nullable SentryDate timestamp) {
return NoOpSpan.getInstance();
}

@Override
public @Nullable Span getLatestActiveSpan() {
return null;
Expand Down
1 change: 0 additions & 1 deletion sentry/src/main/java/io/sentry/Sentry.java
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@ public static void endSession() {
* @param transactionOptions options for the transaction
* @return created transaction.
*/
@ApiStatus.Internal
public static @NotNull ITransaction startTransaction(
final @NotNull TransactionContext transactionContext,
final @NotNull TransactionOptions transactionOptions) {
Expand Down
8 changes: 8 additions & 0 deletions sentry/src/main/java/io/sentry/SentryTracer.java
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,14 @@ private ISpan createChild(
return createChild(operation, description, timestamp, instrumenter, spanOptions);
}

@Override
public @NotNull ISpan startChild(
final @NotNull String operation,
@Nullable String description,
@Nullable SentryDate timestamp) {
return createChild(operation, description, timestamp, Instrumenter.SENTRY, new SpanOptions());
}

@Override
public @NotNull ISpan startChild(
final @NotNull String operation, final @Nullable String description) {
Expand Down

0 comments on commit b91be82

Please sign in to comment.