Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
getsentry-bot committed Feb 26, 2025
1 parent 093e907 commit 0682748
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 22 deletions.
8 changes: 4 additions & 4 deletions sentry/src/main/java/io/sentry/IScopes.java
Original file line number Diff line number Diff line change
Expand Up @@ -666,10 +666,10 @@ TransactionContext continueTrace(
* @param sampleRand the random value used to sample with by the origin of the trace
*/
void setTrace(
final @NotNull String traceId,
final @NotNull String spanId,
final @Nullable Double sampleRate,
final @Nullable Double sampleRand);
final @NotNull String traceId,
final @NotNull String spanId,
final @Nullable Double sampleRate,
final @Nullable Double sampleRand);

/**
* Returns the "sentry-trace" header that allows tracing across services. Can also be used in
Expand Down
8 changes: 4 additions & 4 deletions sentry/src/main/java/io/sentry/NoOpHub.java
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,10 @@ public void reportFullyDisplayed() {}

@Override
public void setTrace(
final @NotNull String traceId,
final @NotNull String spanId,
final @Nullable Double sampleRate,
final @Nullable Double sampleRand) {}
final @NotNull String traceId,
final @NotNull String spanId,
final @Nullable Double sampleRate,
final @Nullable Double sampleRand) {}

@Override
public @Nullable SentryTraceHeader getTraceparent() {
Expand Down
8 changes: 4 additions & 4 deletions sentry/src/main/java/io/sentry/NoOpScopes.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ public void reportFullyDisplayed() {}

@Override
public void setTrace(
final @NotNull String traceId,
final @NotNull String spanId,
final @Nullable Double sampleRate,
final @Nullable Double sampleRand) {}
final @NotNull String traceId,
final @NotNull String spanId,
final @Nullable Double sampleRate,
final @Nullable Double sampleRand) {}

@Override
public @Nullable SentryTraceHeader getTraceparent() {
Expand Down
10 changes: 5 additions & 5 deletions sentry/src/main/java/io/sentry/PropagationContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public static PropagationContext fromHeaders(
final @Nullable Double decisionSampleRate,
final @Nullable Double decisionSampleRand) {
return new PropagationContext(
new SentryId(traceId),
new SpanId(),
new SpanId(spanId),
TracingUtils.ensureBaggage(null, null, decisionSampleRate, decisionSampleRand),
null);
new SentryId(traceId),
new SpanId(),
new SpanId(spanId),
TracingUtils.ensureBaggage(null, null, decisionSampleRate, decisionSampleRand),
null);
}

private @NotNull SentryId traceId;
Expand Down
15 changes: 10 additions & 5 deletions sentry/src/main/java/io/sentry/Scopes.java
Original file line number Diff line number Diff line change
Expand Up @@ -978,9 +978,9 @@ public void reportFullyDisplayed() {
configureScope(
(scope) -> {
scope.withPropagationContext(
oldPropagationContext -> {
scope.setPropagationContext(propagationContext);
});
oldPropagationContext -> {
scope.setPropagationContext(propagationContext);
});
});
if (getOptions().isTracingEnabled()) {
return TransactionContext.fromPropagationContext(propagationContext);
Expand All @@ -991,8 +991,13 @@ public void reportFullyDisplayed() {

@Override
public void setTrace(
final @NotNull String traceId, final @NotNull String spanId, final @Nullable Double sampleRate, final @Nullable Double sampleRand) {
@NotNull PropagationContext propagationContext = PropagationContext.fromExistingTrace(traceId, spanId, sampleRate, sampleRand);
final @NotNull String traceId,
final @NotNull String spanId,
final @Nullable Double sampleRate,
final @Nullable Double sampleRand) {
@NotNull
PropagationContext propagationContext =
PropagationContext.fromExistingTrace(traceId, spanId, sampleRate, sampleRand);
configureScope(
(scope) -> {
scope.setPropagationContext(propagationContext);
Expand Down

0 comments on commit 0682748

Please sign in to comment.