Skip to content

Commit 6350dff

Browse files
committed
remove StandardComponentId.toString
1 parent b53cbe9 commit 6350dff

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

sdk/common/src/main/java/io/opentelemetry/sdk/internal/StandardComponentId.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ public enum ExporterType {
4444
this.signal = signal;
4545
}
4646

47-
@Override
48-
public String toString() {
49-
return value;
50-
}
51-
5247
public Signal signal() {
5348
return signal;
5449
}

sdk/common/src/test/java/io/opentelemetry/sdk/internal/ComponentIdTest.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,36 @@ class ComponentIdTest {
1414

1515
@Test
1616
void testStandardTypesUpToDate() {
17-
assertThat(StandardComponentId.ExporterType.OTLP_GRPC_SPAN_EXPORTER.toString())
17+
assertThat(StandardComponentId.ExporterType.OTLP_GRPC_SPAN_EXPORTER.value)
1818
.isEqualTo(
1919
OtelIncubatingAttributes.OtelComponentTypeIncubatingValues.OTLP_GRPC_SPAN_EXPORTER);
20-
assertThat(StandardComponentId.ExporterType.OTLP_HTTP_SPAN_EXPORTER.toString())
20+
assertThat(StandardComponentId.ExporterType.OTLP_HTTP_SPAN_EXPORTER.value)
2121
.isEqualTo(
2222
OtelIncubatingAttributes.OtelComponentTypeIncubatingValues.OTLP_HTTP_SPAN_EXPORTER);
23-
assertThat(StandardComponentId.ExporterType.OTLP_HTTP_JSON_SPAN_EXPORTER.toString())
23+
assertThat(StandardComponentId.ExporterType.OTLP_HTTP_JSON_SPAN_EXPORTER.value)
2424
.isEqualTo(
2525
OtelIncubatingAttributes.OtelComponentTypeIncubatingValues
2626
.OTLP_HTTP_JSON_SPAN_EXPORTER);
27-
assertThat(StandardComponentId.ExporterType.OTLP_GRPC_LOG_EXPORTER.toString())
27+
assertThat(StandardComponentId.ExporterType.OTLP_GRPC_LOG_EXPORTER.value)
2828
.isEqualTo(
2929
OtelIncubatingAttributes.OtelComponentTypeIncubatingValues.OTLP_GRPC_LOG_EXPORTER);
30-
assertThat(StandardComponentId.ExporterType.OTLP_HTTP_LOG_EXPORTER.toString())
30+
assertThat(StandardComponentId.ExporterType.OTLP_HTTP_LOG_EXPORTER.value)
3131
.isEqualTo(
3232
OtelIncubatingAttributes.OtelComponentTypeIncubatingValues.OTLP_HTTP_LOG_EXPORTER);
33-
assertThat(StandardComponentId.ExporterType.OTLP_HTTP_JSON_LOG_EXPORTER.toString())
33+
assertThat(StandardComponentId.ExporterType.OTLP_HTTP_JSON_LOG_EXPORTER.value)
3434
.isEqualTo(
3535
OtelIncubatingAttributes.OtelComponentTypeIncubatingValues.OTLP_HTTP_JSON_LOG_EXPORTER);
3636
// TODO: uncomment as soon as available in semconv release
37-
// assertThat(ComponentId.StandardType.OTLP_GRPC_METRIC_EXPORTER.toString())
37+
// assertThat(ComponentId.StandardType.OTLP_GRPC_METRIC_EXPORTER.value)
3838
//
3939
// .isEqualTo(OtelIncubatingAttributes.OtelComponentTypeIncubatingValues.OTLP_GRPC_METRIC_EXPORTER);
40-
// assertThat(ComponentId.StandardType.OTLP_HTTP_METRIC_EXPORTER.toString())
40+
// assertThat(ComponentId.StandardType.OTLP_HTTP_METRIC_EXPORTER.value)
4141
//
4242
// .isEqualTo(OtelIncubatingAttributes.OtelComponentTypeIncubatingValues.OTLP_HTTP_METRIC_EXPORTER);
43-
// assertThat(ComponentId.StandardType.OTLP_HTTP_JSON_METRIC_EXPORTER.toString())
43+
// assertThat(ComponentId.StandardType.OTLP_HTTP_JSON_METRIC_EXPORTER.value)
4444
//
4545
// .isEqualTo(OtelIncubatingAttributes.OtelComponentTypeIncubatingValues.OTLP_HTTP_JSON_METRIC_EXPORTER);
46-
// assertThat(ComponentId.StandardType.ZIPKIN_HTTP_SPAN_EXPORTER.toString())
46+
// assertThat(ComponentId.StandardType.ZIPKIN_HTTP_SPAN_EXPORTER.value)
4747
//
4848
// .isEqualTo(OtelIncubatingAttributes.OtelComponentTypeIncubatingValues.ZIPKIN_HTTP_SPAN_EXPORTER);
4949
}

0 commit comments

Comments
 (0)