diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/AzureMonitor.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/AzureMonitor.java index a071ea366cf9e..e61297c5a3110 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/AzureMonitor.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/AzureMonitor.java @@ -3,13 +3,6 @@ package com.azure.monitor.opentelemetry; -import com.azure.core.annotation.Fluent; -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.util.ClientOptions; import com.azure.monitor.opentelemetry.exporter.AzureMonitorExporterBuilder; import com.azure.monitor.opentelemetry.exporter.implementation.AzureMonitorExporterProviderKeys; import com.azure.monitor.opentelemetry.exporter.implementation.AzureMonitorLogRecordExporterProvider; @@ -66,7 +59,7 @@ public static void configure(AutoConfiguredOpenTelemetrySdkBuilder autoConfigure }); autoConfiguredOpenTelemetrySdkBuilder.addSpanExporterCustomizer((spanExporter, configProperties) -> { if (spanExporter instanceof AzureMonitorSpanExporterProvider.MarkerSpanExporter) { - spanExporter = azureMonitorExporterBuilder.buildTraceExporter(configProperties); + spanExporter = azureMonitorExporterBuilder.buildSpanExporter(configProperties); } return spanExporter; }); diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/AzureMonitorExporterBuilder.java b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/AzureMonitorExporterBuilder.java index 53fe4f8614f1d..734d2f31646f7 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/AzureMonitorExporterBuilder.java +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/src/main/java/com/azure/monitor/opentelemetry/exporter/AzureMonitorExporterBuilder.java @@ -271,13 +271,13 @@ public AzureMonitorExporterBuilder credential(TokenCredential credential) { * @throws NullPointerException if the connection string is not set on this builder or if the * environment variable "APPLICATIONINSIGHTS_CONNECTION_STRING" is not set. */ - public SpanExporter buildTraceExporter() { + public SpanExporter buildSpanExporter() { ConfigProperties defaultConfig = DefaultConfigProperties.create(Collections.emptyMap()); - return buildTraceExporter(defaultConfig); + return buildSpanExporter(defaultConfig); } /** - * Creates an Azure Monitor trace exporter based on the options set in the builder. This + * Creates an Azure Monitor span exporter based on the options set in the builder. This * exporter is an implementation of OpenTelemetry {@link SpanExporter}. * * @param configProperties The OpenTelemetry configuration properties. @@ -285,7 +285,7 @@ public SpanExporter buildTraceExporter() { * @throws NullPointerException if the connection string is not set on this builder or if the * environment variable "APPLICATIONINSIGHTS_CONNECTION_STRING" is not set. */ - public SpanExporter buildTraceExporter(ConfigProperties configProperties) { + public SpanExporter buildSpanExporter(ConfigProperties configProperties) { internalBuildAndFreeze(configProperties); return new AzureMonitorTraceExporter(createSpanDataMapper(configProperties), builtTelemetryItemExporter, statsbeatModule);