Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove resource setter and getter from Tracer #387

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions api/src/main/java/io/opentelemetry/trace/DefaultTracer.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import io.opentelemetry.context.propagation.HttpTextFormat;
import io.opentelemetry.context.propagation.TraceContextFormat;
import io.opentelemetry.internal.Utils;
import io.opentelemetry.resources.Resource;
import io.opentelemetry.trace.unsafe.ContextUtils;
import java.util.List;
import javax.annotation.Nullable;
Expand Down Expand Up @@ -66,16 +65,6 @@ public void recordSpanData(SpanData spanData) {
Utils.checkNotNull(spanData, "spanData");
}

@Override
public void setResource(Resource resource) {
// do nothing
}

@Override
public Resource getResource() {
return Resource.getEmpty();
}

@Override
public BinaryFormat<SpanContext> getBinaryFormat() {
return BINARY_FORMAT;
Expand Down
18 changes: 0 additions & 18 deletions api/src/main/java/io/opentelemetry/trace/Tracer.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import io.opentelemetry.context.Scope;
import io.opentelemetry.context.propagation.BinaryFormat;
import io.opentelemetry.context.propagation.HttpTextFormat;
import io.opentelemetry.resources.Resource;

/**
* Tracer is a simple, interface for {@link Span} creation and in-process context interaction.
Expand Down Expand Up @@ -152,23 +151,6 @@ public interface Tracer {
*/
Span.Builder spanBuilder(String spanName);

/**
* Sets the {@link Resource} to be associated with all {@link Span} and {@link SpanData} objects
* recorded by this {@link Tracer}.
*
* @param resource Resource to be associated with all {@link Span} and {@link SpanData} objects.
*/
void setResource(Resource resource);

/**
* Gets the {@link Resource} that is associating with all the {@link Span} and {@link SpanData}
* objects recorded by this {@link Tracer}.
*
* @return {@link Resource} that is associating with all {@link Span} and {@link SpanData}
* objects.
*/
Resource getResource();

/**
* Records a {@link SpanData}. This API allows to send a pre-populated span object to the
* exporter. Sampling and recording decisions as well as other collection optimizations is a
Expand Down
9 changes: 0 additions & 9 deletions api/src/test/java/io/opentelemetry/OpenTelemetryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import io.opentelemetry.metrics.Measurement;
import io.opentelemetry.metrics.Meter;
import io.opentelemetry.metrics.spi.MeterProvider;
import io.opentelemetry.resources.Resource;
import io.opentelemetry.tags.DefaultTagger;
import io.opentelemetry.tags.TagMap;
import io.opentelemetry.tags.Tagger;
Expand Down Expand Up @@ -215,14 +214,6 @@ public Span.Builder spanBuilder(String spanName) {
return null;
}

@Override
public void setResource(Resource resource) {}

@Override
public Resource getResource() {
return null;
}

@Override
public void recordSpanData(SpanData span) {}

Expand Down
9 changes: 0 additions & 9 deletions sdk/src/main/java/io/opentelemetry/sdk/trace/TracerSdk.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import io.opentelemetry.context.propagation.BinaryFormat;
import io.opentelemetry.context.propagation.HttpTextFormat;
import io.opentelemetry.context.propagation.TraceContextFormat;
import io.opentelemetry.resources.Resource;
import io.opentelemetry.sdk.trace.config.TraceConfig;
import io.opentelemetry.trace.Span;
import io.opentelemetry.trace.SpanContext;
Expand Down Expand Up @@ -51,14 +50,6 @@ public Span.Builder spanBuilder(String spanName) {
return null;
}

@Override
public void setResource(Resource resource) {}

@Override
public Resource getResource() {
return null;
}

@Override
public void recordSpanData(SpanData span) {}

Expand Down