Skip to content

Commit

Permalink
move check up
Browse files Browse the repository at this point in the history
  • Loading branch information
adinauer committed Sep 23, 2024
1 parent e33933a commit 9cabbf3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sentry/src/main/java/io/sentry/SentryTracer.java
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,14 @@ private ISpan createChild(
return NoOpSpan.getInstance();
}

final @Nullable SpanId parentSpanId = spanContext.getParentSpanId();
final @NotNull String operation = spanContext.getOperation();
final @Nullable String description = spanContext.getDescription();

if (SpanUtils.isIgnored(scopes.getOptions().getIgnoredSpanOrigins(), spanOptions.getOrigin())) {
return NoOpSpan.getInstance();
}

final @Nullable SpanId parentSpanId = spanContext.getParentSpanId();
final @NotNull String operation = spanContext.getOperation();
final @Nullable String description = spanContext.getDescription();

if (children.size() < scopes.getOptions().getMaxSpans()) {
Objects.requireNonNull(parentSpanId, "parentSpanId is required");
Objects.requireNonNull(operation, "operation is required");
Expand Down

0 comments on commit 9cabbf3

Please sign in to comment.