Skip to content

Commit 97b5fc9

Browse files
committed
Review feedback: avoid cast exception if span.kind set to non-string value
1 parent cddc85b commit 97b5fc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dd-trace-core/src/main/java/datadog/trace/core/otlp/trace/OtlpTraceProto.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public static byte[] recordSpanMessage(
126126
}
127127

128128
writeTag(buf, 6, VARINT_WIRE_TYPE);
129-
writeVarInt(buf, spanKind((CharSequence) span.getTag(SPAN_KIND)));
129+
writeVarInt(buf, spanKind(span.context().getSpanKindString()));
130130

131131
writeTag(buf, 7, I64_WIRE_TYPE);
132132
writeI64(buf, span.getStartTime());

0 commit comments

Comments
 (0)