Skip to content

Commit 0738b6a

Browse files
dougqhclaude
andcommitted
Rename setSpanKind to setSpanKindOrdinal for clarity
The method sets the cached ordinal, not the string form. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e497ad0 commit 0738b6a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

dd-trace-core/src/main/java/datadog/trace/core/DDSpanContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ static boolean tagEquals(String tagValue, String tagLiteral) {
751751
* Cache the span.kind ordinal for fast isOutbound() checks. Called from TagInterceptor when
752752
* span.kind is set.
753753
*/
754-
public void setSpanKind(String kind) {
754+
public void setSpanKindOrdinal(String kind) {
755755
if (kind == null) {
756756
spanKindOrdinal = SPAN_KIND_UNSET;
757757
} else if (tagEquals(kind, Tags.SPAN_KIND_SERVER)) {

dd-trace-core/src/main/java/datadog/trace/core/taginterceptor/TagInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public boolean interceptTag(DDSpanContext span, String tag, Object value) {
197197
case Tags.SPAN_KIND:
198198
// Cache the ordinal for fast isOutbound() checks.
199199
// Return false so the value is still stored in unsafeTags for serialization.
200-
span.setSpanKind(String.valueOf(value));
200+
span.setSpanKindOrdinal(String.valueOf(value));
201201
return false;
202202
default:
203203
return intercept(span, tag, value);

0 commit comments

Comments
 (0)