Debug logs for hot paths
MODIFY
dd-trace-ot/src/main/java/datadog/opentracing/DDSpanContext.java
dd-trace-ot/src/main/java/datadog/opentracing/DDSpanContext.java
@@ -158,7 +158,7 @@ public class DDSpanContext implements io.opentracing.SpanContext {
public void setSamplingPriority(final int newPriority) {
if (samplingPriorityLocked) {
- log.warn(
+ log.debug(
"samplingPriority locked at {}. Refusing to set to {}", samplingPriority, newPriority);
} else {
synchronized (this) {
@@ -258,7 +258,7 @@ public class DDSpanContext implements io.opentracing.SpanContext {
try {
decorator.afterSetTag(this, tag, value);
} catch (final Throwable ex) {
- log.warn(
+ log.debug(
"Could not decorate the span decorator={}: {}",
decorator.getClass().getSimpleName(),
ex.getMessage());

MODIFY
dd-trace-ot/src/main/java/datadog/opentracing/DDTracer.java
dd-trace-ot/src/main/java/datadog/opentracing/DDTracer.java
@@ -215,7 +215,7 @@ public class DDTracer implements io.opentracing.Tracer {
final Codec<T> codec = registry.get(format);
if (codec == null) {
- log.warn("Unsupported format for propagation - {}", format.getClass().getName());
+ log.debug("Unsupported format for propagation - {}", format.getClass().getName());
} else {
codec.inject((DDSpanContext) spanContext, carrier);
}
@@ -225,7 +225,7 @@ public class DDTracer implements io.opentracing.Tracer {
public <T> SpanContext extract(final Format<T> format, final T carrier) {
final Codec<T> codec = registry.get(format);
if (codec == null) {
- log.warn("Unsupported format for propagation - {}", format.getClass().getName());
+ log.debug("Unsupported format for propagation - {}", format.getClass().getName());
} else {
return codec.extract(carrier);
}

MODIFY
dd-trace-ot/src/main/java/datadog/opentracing/PendingTrace.java
dd-trace-ot/src/main/java/datadog/opentracing/PendingTrace.java
@@ -41,7 +41,7 @@ public class PendingTrace extends ConcurrentLinkedDeque<DDSpan> {
public void registerSpan(final DDSpan span) {
if (span.context().getTraceId() != traceId) {
- log.warn("{} - span registered for wrong trace ({})", span, traceId);
+ log.debug("{} - span registered for wrong trace ({})", span, traceId);
return;
}
synchronized (span) {
@@ -58,7 +58,7 @@ public class PendingTrace extends ConcurrentLinkedDeque<DDSpan> {
private void expireSpan(final DDSpan span) {
if (span.context().getTraceId() != traceId) {
- log.warn("{} - span expired for wrong trace ({})", span, traceId);
+ log.debug("{} - span expired for wrong trace ({})", span, traceId);
return;
}
synchronized (span) {
@@ -79,7 +79,7 @@ public class PendingTrace extends ConcurrentLinkedDeque<DDSpan> {
return;
}
if (traceId != span.getTraceId()) {
- log.warn("{} - added to a mismatched trace.", span);
+ log.debug("{} - added to a mismatched trace.", span);
return;
}

Debug logs for hot paths