Skip to content

Commit 5809d2c

Browse files
authored
Rename SdkTracerMetrics to SdkTracerInstrumentation (#7930)
1 parent 22d90b6 commit 5809d2c

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkSpanBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public Span startSpan() {
205205
tracerSharedState.isIdGeneratorSafeToSkipIdValidation());
206206

207207
Runnable recordEndSpanMetrics =
208-
tracerSharedState.getTracerMetrics().startSpan(parentSpanContext, samplingDecision);
208+
tracerSharedState.getTracerInstrumentation().startSpan(parentSpanContext, samplingDecision);
209209

210210
if (!isRecording(samplingDecision)) {
211211
return Span.wrap(spanContext);

sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkTracerMetrics.java renamed to sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkTracerInstrumentation.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* href="https://opentelemetry.io/docs/specs/semconv/otel/sdk-metrics/#span-metrics">semantic
2424
* conventions</a>.
2525
*/
26-
final class SdkTracerMetrics {
26+
final class SdkTracerInstrumentation {
2727

2828
private static final Attributes noParentDrop =
2929
Attributes.of(
@@ -92,7 +92,7 @@ final class SdkTracerMetrics {
9292
@Nullable private volatile LongCounter startedSpans;
9393
@Nullable private volatile LongUpDownCounter liveSpans;
9494

95-
SdkTracerMetrics(Supplier<MeterProvider> meterProvider) {
95+
SdkTracerInstrumentation(Supplier<MeterProvider> meterProvider) {
9696
this.meterProvider = meterProvider;
9797
}
9898

@@ -105,7 +105,7 @@ Runnable startSpan(SpanContext parentSpanContext, SamplingDecision samplingDecis
105105
switch (samplingDecision) {
106106
case DROP:
107107
startedSpans().add(1, noParentDrop);
108-
return SdkTracerMetrics::noop;
108+
return SdkTracerInstrumentation::noop;
109109
case RECORD_ONLY:
110110
startedSpans().add(1, noParentRecordOnly);
111111
liveSpans().add(1, recordOnly);
@@ -120,7 +120,7 @@ Runnable startSpan(SpanContext parentSpanContext, SamplingDecision samplingDecis
120120
switch (samplingDecision) {
121121
case DROP:
122122
startedSpans().add(1, remoteParentDrop);
123-
return SdkTracerMetrics::noop;
123+
return SdkTracerInstrumentation::noop;
124124
case RECORD_ONLY:
125125
startedSpans().add(1, remoteParentRecordOnly);
126126
liveSpans().add(1, recordOnly);
@@ -136,7 +136,7 @@ Runnable startSpan(SpanContext parentSpanContext, SamplingDecision samplingDecis
136136
switch (samplingDecision) {
137137
case DROP:
138138
startedSpans().add(1, localParentDrop);
139-
return SdkTracerMetrics::noop;
139+
return SdkTracerInstrumentation::noop;
140140
case RECORD_ONLY:
141141
startedSpans().add(1, localParentRecordOnly);
142142
liveSpans().add(1, recordOnly);

sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkTracerProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static SdkTracerProviderBuilder builder() {
6666
sampler,
6767
spanProcessors,
6868
exceptionAttributeResolver,
69-
new SdkTracerMetrics(meterProvider));
69+
new SdkTracerInstrumentation(meterProvider));
7070
this.tracerSdkComponentRegistry =
7171
new ComponentRegistry<>(
7272
instrumentationScopeInfo ->

sdk/trace/src/main/java/io/opentelemetry/sdk/trace/TracerSharedState.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class TracerSharedState {
2828
private final Sampler sampler;
2929
private final SpanProcessor activeSpanProcessor;
3030
private final ExceptionAttributeResolver exceptionAttributeResolver;
31-
private final SdkTracerMetrics tracerMetrics;
31+
private final SdkTracerInstrumentation tracerInstrumentation;
3232

3333
@Nullable private volatile CompletableResultCode shutdownResult = null;
3434

@@ -40,7 +40,7 @@ final class TracerSharedState {
4040
Sampler sampler,
4141
List<SpanProcessor> spanProcessors,
4242
ExceptionAttributeResolver exceptionAttributeResolver,
43-
SdkTracerMetrics tracerMetrics) {
43+
SdkTracerInstrumentation tracerInstrumentation) {
4444
this.clock = clock;
4545
this.idGenerator = idGenerator;
4646
this.idGeneratorSafeToSkipIdValidation = idGenerator instanceof RandomIdGenerator;
@@ -49,7 +49,7 @@ final class TracerSharedState {
4949
this.sampler = sampler;
5050
this.activeSpanProcessor = SpanProcessor.composite(spanProcessors);
5151
this.exceptionAttributeResolver = exceptionAttributeResolver;
52-
this.tracerMetrics = tracerMetrics;
52+
this.tracerInstrumentation = tracerInstrumentation;
5353
}
5454

5555
Clock getClock() {
@@ -101,8 +101,8 @@ ExceptionAttributeResolver getExceptionAttributesResolver() {
101101
return exceptionAttributeResolver;
102102
}
103103

104-
SdkTracerMetrics getTracerMetrics() {
105-
return tracerMetrics;
104+
SdkTracerInstrumentation getTracerInstrumentation() {
105+
return tracerInstrumentation;
106106
}
107107

108108
/**

0 commit comments

Comments
 (0)