Skip to content

Commit 96dcbbe

Browse files
committed
chore: Fix Javaodc link
1 parent 6ea70e7 commit 96dcbbe

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import com.squareup.moshi.ToJson;
99
import datadog.trace.api.DDSpanId;
1010
import datadog.trace.api.DDTraceId;
11-
import datadog.trace.bootstrap.instrumentation.api.AgentSpan;
11+
import datadog.trace.bootstrap.instrumentation.api.AgentSpan.Attributes;
1212
import datadog.trace.bootstrap.instrumentation.api.AgentSpanLink;
1313
import datadog.trace.bootstrap.instrumentation.api.SpanAttributes;
1414
import datadog.trace.bootstrap.instrumentation.api.SpanLink;
@@ -26,11 +26,7 @@ public class DDSpanLink extends SpanLink {
2626
private static final int TAG_MAX_LENGTH = 25_000;
2727

2828
protected DDSpanLink(
29-
DDTraceId traceId,
30-
long spanId,
31-
byte traceFlags,
32-
String traceState,
33-
AgentSpan.Attributes attributes) {
29+
DDTraceId traceId, long spanId, byte traceFlags, String traceState, Attributes attributes) {
3430
super(traceId, spanId, traceFlags, traceState, attributes);
3531
}
3632

@@ -53,7 +49,7 @@ public static SpanLink from(ExtractedContext context) {
5349
* @param attributes The span link attributes.
5450
* @return A span link to the given context with custom attributes.
5551
*/
56-
public static SpanLink from(ExtractedContext context, AgentSpan.Attributes attributes) {
52+
public static SpanLink from(ExtractedContext context, Attributes attributes) {
5753
byte traceFlags = context.getSamplingPriority() > 0 ? SAMPLED_FLAG : DEFAULT_FLAGS;
5854
String traceState =
5955
context.getPropagationTags() == null

internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/AgentSpanLink.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package datadog.trace.bootstrap.instrumentation.api;
22

33
import datadog.trace.api.DDTraceId;
4+
import datadog.trace.bootstrap.instrumentation.api.AgentSpan.Attributes;
45

56
/**
67
* This interface describes a link to another span. The linked span could be part of the same trace
@@ -49,5 +50,5 @@ public interface AgentSpanLink {
4950
*
5051
* @return The link attributes.
5152
*/
52-
AgentSpan.Attributes attributes();
53+
Attributes attributes();
5354
}

internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/SpanAttributes.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
import static java.util.Objects.requireNonNull;
44

5+
import datadog.trace.bootstrap.instrumentation.api.AgentSpan.Attributes;
56
import java.util.Collections;
67
import java.util.HashMap;
78
import java.util.List;
89
import java.util.Map;
910

10-
/** This class is a base implementation of {@link AgentSpanAttributes}. */
11-
// TODO: How to link to AgentSpan.Attributes?
12-
public class SpanAttributes implements AgentSpan.Attributes {
11+
/** This class is a base implementation of {@link Attributes}. */
12+
public class SpanAttributes implements Attributes {
1313
/** Represent an empty attributes. */
14-
public static final AgentSpan.Attributes EMPTY = new SpanAttributes(Collections.emptyMap());
14+
public static final Attributes EMPTY = new SpanAttributes(Collections.emptyMap());
1515

1616
private final Map<String, String> attributes;
1717

@@ -115,7 +115,7 @@ protected <T> Builder putArray(String key, List<T> array) {
115115
return this;
116116
}
117117

118-
public AgentSpan.Attributes build() {
118+
public Attributes build() {
119119
return new SpanAttributes(this.attributes);
120120
}
121121
}

0 commit comments

Comments
 (0)