@Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof RealSpan)) return false; return context.equals(((RealSpan) o).context); }
@Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof NoopSpan)) return false; return context.equals(((NoopSpan) o).context); }
@Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof NoopScopedSpan)) return false; NoopScopedSpan that = (NoopScopedSpan) o; return context.equals(that.context) && scope.equals(that.scope); }
@Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof RealScopedSpan)) return false; RealScopedSpan that = (RealScopedSpan) o; return context.equals(that.context) && scope.equals(that.scope); }
/** Resolves hash code collisions */ @Override public boolean equals(Object other) { TraceContext thisContext = get(), thatContext = ((RealKey) other).get(); if (thisContext == null) { return thatContext == null; } else { return thisContext.equals(thatContext); } } }
KafkaTracing(Builder builder) { // intentionally hidden constructor this.tracing = builder.tracing; this.extractor = tracing.propagation().extractor(KafkaPropagation.GETTER); List<String> keyList = builder.tracing.propagation().keys(); // Use a more efficient injector if we are only propagating a single header if (builder.writeB3SingleFormat || keyList.equals(Propagation.B3_SINGLE_STRING.keys())) { TraceContext testExtraction = extractor.extract(B3_SINGLE_TEST_HEADERS).context(); if (!TEST_CONTEXT.equals(testExtraction)) { throw new IllegalArgumentException( "KafkaTracing.Builder.writeB3SingleFormat set, but Tracing.Builder.propagationFactory cannot parse this format!"); } this.injector = KafkaPropagation.B3_SINGLE_INJECTOR; } else { this.injector = tracing.propagation().injector(KafkaPropagation.SETTER); } this.propagationKeys = new LinkedHashSet<>(keyList); this.remoteServiceName = builder.remoteServiceName; }
SpringRabbitTracing(Builder builder) { // intentionally hidden constructor this.tracing = builder.tracing; this.extractor = tracing.propagation().extractor(SpringRabbitPropagation.GETTER); List<String> keyList = builder.tracing.propagation().keys(); // Use a more efficient injector if we are only propagating a single header if (builder.writeB3SingleFormat || keyList.equals(Propagation.B3_SINGLE_STRING.keys())) { TraceContext testExtraction = extractor.extract(B3_SINGLE_TEST_HEADERS).context(); if (!TEST_CONTEXT.equals(testExtraction)) { throw new IllegalArgumentException( "SpringRabbitTracing.Builder.writeB3SingleFormat set, but Tracing.Builder.propagationFactory cannot parse this format!"); } this.injector = SpringRabbitPropagation.B3_SINGLE_INJECTOR; } else { this.injector = tracing.propagation().injector(SpringRabbitPropagation.SETTER); } this.propagationKeys = keyList; this.remoteServiceName = builder.remoteServiceName; Field beforePublishPostProcessorsField = null; try { beforePublishPostProcessorsField = RabbitTemplate.class.getDeclaredField("beforePublishPostProcessors"); beforePublishPostProcessorsField.setAccessible(true); } catch (NoSuchFieldException e) { } this.beforePublishPostProcessorsField = beforePublishPostProcessorsField; }
return newScope(null); return currentSpan.equals(currentScope) ? Scope.NOOP : newScope(currentSpan);
@Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof NoopSpan)) return false; return context.equals(((NoopSpan) o).context); }
@Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof RealSpan)) return false; return context.equals(((RealSpan) o).context); }
@Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof NoopScopedSpan)) return false; NoopScopedSpan that = (NoopScopedSpan) o; return context.equals(that.context) && scope.equals(that.scope); }
@Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof RealScopedSpan)) return false; RealScopedSpan that = (RealScopedSpan) o; return context.equals(that.context) && scope.equals(that.scope); }
/** Resolves hash code collisions */ @Override public boolean equals(Object other) { TraceContext thisContext = get(), thatContext = ((RealKey) other).get(); if (thisContext == null) { return thatContext == null; } else { return thisContext.equals(thatContext); } } }
KafkaTracing(Builder builder) { // intentionally hidden constructor this.tracing = builder.tracing; this.extractor = tracing.propagation().extractor(KafkaPropagation.GETTER); List<String> keyList = builder.tracing.propagation().keys(); // Use a more efficient injector if we are only propagating a single header if (builder.writeB3SingleFormat || keyList.equals(Propagation.B3_SINGLE_STRING.keys())) { TraceContext testExtraction = extractor.extract(B3_SINGLE_TEST_HEADERS).context(); if (!TEST_CONTEXT.equals(testExtraction)) { throw new IllegalArgumentException( "KafkaTracing.Builder.writeB3SingleFormat set, but Tracing.Builder.propagationFactory cannot parse this format!"); } this.injector = KafkaPropagation.B3_SINGLE_INJECTOR; } else { this.injector = tracing.propagation().injector(KafkaPropagation.SETTER); } this.propagationKeys = new LinkedHashSet<>(keyList); this.remoteServiceName = builder.remoteServiceName; }
return newScope(null); return currentSpan.equals(currentScope) ? Scope.NOOP : newScope(currentSpan);