Skip to content

Commit

Permalink
chore: Fix Javaodc link
Browse files Browse the repository at this point in the history
  • Loading branch information
PerfectSlayer committed Aug 14, 2024
1 parent 6ea70e7 commit 96dcbbe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
10 changes: 3 additions & 7 deletions dd-trace-core/src/main/java/datadog/trace/core/DDSpanLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.squareup.moshi.ToJson;
import datadog.trace.api.DDSpanId;
import datadog.trace.api.DDTraceId;
import datadog.trace.bootstrap.instrumentation.api.AgentSpan;
import datadog.trace.bootstrap.instrumentation.api.AgentSpan.Attributes;
import datadog.trace.bootstrap.instrumentation.api.AgentSpanLink;
import datadog.trace.bootstrap.instrumentation.api.SpanAttributes;
import datadog.trace.bootstrap.instrumentation.api.SpanLink;
Expand All @@ -26,11 +26,7 @@ public class DDSpanLink extends SpanLink {
private static final int TAG_MAX_LENGTH = 25_000;

protected DDSpanLink(
DDTraceId traceId,
long spanId,
byte traceFlags,
String traceState,
AgentSpan.Attributes attributes) {
DDTraceId traceId, long spanId, byte traceFlags, String traceState, Attributes attributes) {
super(traceId, spanId, traceFlags, traceState, attributes);
}

Expand All @@ -53,7 +49,7 @@ public static SpanLink from(ExtractedContext context) {
* @param attributes The span link attributes.
* @return A span link to the given context with custom attributes.
*/
public static SpanLink from(ExtractedContext context, AgentSpan.Attributes attributes) {
public static SpanLink from(ExtractedContext context, Attributes attributes) {
byte traceFlags = context.getSamplingPriority() > 0 ? SAMPLED_FLAG : DEFAULT_FLAGS;
String traceState =
context.getPropagationTags() == null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package datadog.trace.bootstrap.instrumentation.api;

import datadog.trace.api.DDTraceId;
import datadog.trace.bootstrap.instrumentation.api.AgentSpan.Attributes;

/**
* This interface describes a link to another span. The linked span could be part of the same trace
Expand Down Expand Up @@ -49,5 +50,5 @@ public interface AgentSpanLink {
*
* @return The link attributes.
*/
AgentSpan.Attributes attributes();
Attributes attributes();
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

import static java.util.Objects.requireNonNull;

import datadog.trace.bootstrap.instrumentation.api.AgentSpan.Attributes;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

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

private final Map<String, String> attributes;

Expand Down Expand Up @@ -115,7 +115,7 @@ protected <T> Builder putArray(String key, List<T> array) {
return this;
}

public AgentSpan.Attributes build() {
public Attributes build() {
return new SpanAttributes(this.attributes);
}
}
Expand Down

0 comments on commit 96dcbbe

Please sign in to comment.