-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use AutoConfiguredOpenTelemetrySdkBuilderCustomizer for Azure (#226)
- Loading branch information
1 parent
f1d5bb7
commit fd3662f
Showing
3 changed files
with
37 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...main/java/io/quarkiverse/opentelemetry/exporter/azure/runtime/AzureMonitorCustomizer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.quarkiverse.opentelemetry.exporter.azure.runtime; | ||
|
||
import com.azure.monitor.opentelemetry.exporter.AzureMonitorExporterBuilder; | ||
|
||
import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder; | ||
import io.quarkus.opentelemetry.runtime.AutoConfiguredOpenTelemetrySdkBuilderCustomizer; | ||
|
||
public class AzureMonitorCustomizer implements AutoConfiguredOpenTelemetrySdkBuilderCustomizer { | ||
|
||
private final String azureConnectionString; | ||
|
||
public AzureMonitorCustomizer(String azureConnectionString) { | ||
this.azureConnectionString = azureConnectionString; | ||
} | ||
|
||
@Override | ||
public void customize(AutoConfiguredOpenTelemetrySdkBuilder builder) { | ||
new AzureMonitorExporterBuilder().connectionString(azureConnectionString) | ||
.install(builder); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters