AzureMonitorExporterBuilder Class
- java.
lang. Object - com.
azure. opentelemetry. exporters. azuremonitor. AzureMonitorExporterBuilder
- com.
public final class AzureMonitorExporterBuilder
This class provides a fluent builder API to instantiate AzureMonitorExporter that implements SpanExporter interface defined by OpenTelemetry API specification.
Constructor Summary
| Constructor | Description |
|---|---|
| AzureMonitorExporterBuilder() |
Creates an instance of AzureMonitorExporterBuilder. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Azure |
addPolicy(HttpPipelinePolicy policy)
Adds a policy to the set of existing policies that are executed after required policies. |
|
Azure |
buildExporter()
Creates an AzureMonitorExporter based on the options set in the builder. |
|
Azure |
configuration(Configuration configuration)
Sets the configuration store that is used during construction of the service client. |
|
Azure |
endpoint(String endpoint)
Sets the service endpoint for the Azure Monitor Exporter. |
|
Azure |
httpClient(HttpClient client)
Sets the HTTP client to use for sending and receiving requests to and from the service. |
|
Azure |
httpLogOptions(HttpLogOptions logOptions)
Sets the logging configuration for HTTP requests and responses. |
|
Azure |
instrumentationKey(String instrumentationKey)
Sets the instrumentation key to use for exporting telemetry events to Azure Monitor. |
|
Azure |
pipeline(HttpPipeline httpPipeline)
Sets the HTTP pipeline to use for the service client. |
|
Azure |
retryPolicy(RetryPolicy retryPolicy)
Sets the RetryPolicy that is used when each request is sent. |
Methods inherited from java.lang.Object
Constructor Details
AzureMonitorExporterBuilder
public AzureMonitorExporterBuilder()
Creates an instance of AzureMonitorExporterBuilder.
Method Details
addPolicy
public AzureMonitorExporterBuilder addPolicy(HttpPipelinePolicy policy)
Adds a policy to the set of existing policies that are executed after required policies.
Parameters:
Returns:
buildExporter
public AzureMonitorExporter buildExporter()
Creates an AzureMonitorExporter based on the options set in the builder. This exporter is an implementation of OpenTelemetry SpanExporter.
Returns:
configuration
public AzureMonitorExporterBuilder configuration(Configuration configuration)
Sets the configuration store that is used during construction of the service client.
The default configuration store is a clone of the global configuration store, use NONE to bypass using configuration settings during construction.
Parameters:
Returns:
endpoint
public AzureMonitorExporterBuilder endpoint(String endpoint)
Sets the service endpoint for the Azure Monitor Exporter.
Parameters:
Returns:
httpClient
public AzureMonitorExporterBuilder httpClient(HttpClient client)
Sets the HTTP client to use for sending and receiving requests to and from the service.
Parameters:
Returns:
httpLogOptions
public AzureMonitorExporterBuilder httpLogOptions(HttpLogOptions logOptions)
Sets the logging configuration for HTTP requests and responses.
If logLevel is not provided, default value of HttpLogDetailLevel#NONE is set.
Parameters:
Returns:
instrumentationKey
public AzureMonitorExporterBuilder instrumentationKey(String instrumentationKey)
Sets the instrumentation key to use for exporting telemetry events to Azure Monitor.
Parameters:
Returns:
pipeline
public AzureMonitorExporterBuilder pipeline(HttpPipeline httpPipeline)
Sets the HTTP pipeline to use for the service client. If pipeline is set, all other settings are ignored, apart from endpoint(String endpoint).
Parameters:
Returns:
retryPolicy
public AzureMonitorExporterBuilder retryPolicy(RetryPolicy retryPolicy)
Sets the RetryPolicy that is used when each request is sent.
The default retry policy will be used if not provided to build AzureMonitorExporterBuilder .
Parameters:
Returns: