Skip to content

Commit

Permalink
Rename buildTraceExporter into buildSpanExporter
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanbisutti committed Sep 16, 2024
1 parent 09d829e commit 81ed7d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,21 +271,21 @@ 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.
* @return An instance of {@link SpanExporter}.
* @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);
Expand Down

0 comments on commit 81ed7d0

Please sign in to comment.