Skip to content

Commit

Permalink
Avoid unnecessary public classes. (#1211)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu authored May 13, 2020
1 parent 5b31c5a commit 5b625d2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 139 deletions.
11 changes: 3 additions & 8 deletions api/src/main/java/io/opentelemetry/OpenTelemetry.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@
import io.opentelemetry.context.propagation.DefaultContextPropagators;
import io.opentelemetry.correlationcontext.CorrelationContextManager;
import io.opentelemetry.correlationcontext.DefaultCorrelationContextManager;
import io.opentelemetry.correlationcontext.DefaultCorrelationContextManagerProvider;
import io.opentelemetry.correlationcontext.spi.CorrelationContextManagerProvider;
import io.opentelemetry.internal.Obfuscated;
import io.opentelemetry.internal.Utils;
import io.opentelemetry.metrics.DefaultMeterProvider;
import io.opentelemetry.metrics.DefaultMetricsProvider;
import io.opentelemetry.metrics.Meter;
import io.opentelemetry.metrics.MeterProvider;
import io.opentelemetry.metrics.spi.MetricsProvider;
import io.opentelemetry.trace.DefaultTraceProvider;
import io.opentelemetry.trace.DefaultTracerProvider;
import io.opentelemetry.trace.Tracer;
import io.opentelemetry.trace.TracerProvider;
Expand Down Expand Up @@ -206,19 +203,17 @@ private OpenTelemetry() {
this.tracerProvider =
traceProvider != null
? new ObfuscatedTracerProvider(traceProvider.create())
: DefaultTraceProvider.getInstance().create();
: DefaultTracerProvider.getInstance();

MetricsProvider metricsProvider = loadSpi(MetricsProvider.class);
meterProvider =
metricsProvider != null
? metricsProvider.create()
: DefaultMetricsProvider.getInstance().create();
metricsProvider != null ? metricsProvider.create() : DefaultMeterProvider.getInstance();
CorrelationContextManagerProvider contextManagerProvider =
loadSpi(CorrelationContextManagerProvider.class);
contextManager =
contextManagerProvider != null
? contextManagerProvider.create()
: DefaultCorrelationContextManagerProvider.getInstance().create();
: DefaultCorrelationContextManager.getInstance();
}

/**
Expand Down

This file was deleted.

This file was deleted.

43 changes: 0 additions & 43 deletions api/src/main/java/io/opentelemetry/trace/DefaultTraceProvider.java

This file was deleted.

0 comments on commit 5b625d2

Please sign in to comment.