diff --git a/content/en/docs/languages/java/exporters.md b/content/en/docs/languages/java/exporters.md index 624c3ce1c352..728ae03e3bb6 100644 --- a/content/en/docs/languages/java/exporters.md +++ b/content/en/docs/languages/java/exporters.md @@ -119,7 +119,7 @@ import io.opentelemetry.sdk.trace.export.BatchSpanProcessor; import io.opentelemetry.sdk.logs.export.BatchLogRecordProcessor; import io.opentelemetry.sdk.logs.SdkLoggerProvider; import io.opentelemetry.sdk.logs.export.LogRecordExporter; -import io.opentelemetry.semconv.resource.attributes.ResourceAttributes; +import io.opentelemetry.semconv; @SpringBootApplication public class DiceApplication { @@ -131,7 +131,7 @@ public class DiceApplication { @Bean public OpenTelemetry openTelemetry() { - Resource resource = Resource.getDefault().toBuilder().put(SERVICE_NAME, "dice-server").put(SERVICE_VERSION, "0.1.0").build(); + Resource resource = Resource.getDefault().toBuilder().put(ServiceAttributes.SERVICE_NAME, "dice-server").put(ServiceAttributes.SERVICE_VERSION, "0.1.0").build(); SdkTracerProvider sdkTracerProvider = SdkTracerProvider.builder() .addSpanProcessor(BatchSpanProcessor.builder(OtlpGrpcSpanExporter.builder().build()).build())