AzureMonitorExporterExtensions.AddAzureMonitorMetricExporter Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds Azure Monitor Metric exporter.
public static OpenTelemetry.Metrics.MeterProviderBuilder AddAzureMonitorMetricExporter (this OpenTelemetry.Metrics.MeterProviderBuilder builder, Action<Azure.Monitor.OpenTelemetry.Exporter.AzureMonitorExporterOptions> configure = default, Azure.Core.TokenCredential credential = default, string name = default);
static member AddAzureMonitorMetricExporter : OpenTelemetry.Metrics.MeterProviderBuilder * Action<Azure.Monitor.OpenTelemetry.Exporter.AzureMonitorExporterOptions> * Azure.Core.TokenCredential * string -> OpenTelemetry.Metrics.MeterProviderBuilder
<Extension()>
Public Function AddAzureMonitorMetricExporter (builder As MeterProviderBuilder, Optional configure As Action(Of AzureMonitorExporterOptions) = Nothing, Optional credential As TokenCredential = Nothing, Optional name As String = Nothing) As MeterProviderBuilder
Parameters
- builder
- OpenTelemetry.Metrics.MeterProviderBuilder
OpenTelemetry.Metrics.MeterProviderBuilder builder to use.
- configure
- Action<AzureMonitorExporterOptions>
Exporter configuration options.
- credential
- TokenCredential
An Azure TokenCredential capable of providing an OAuth token. Note: if a credential is provided to both AzureMonitorExporterOptions and this parameter, the Options will take precedence.
- name
- String
Name which is used when retrieving options.
Returns
The instance of OpenTelemetry.Metrics.MeterProviderBuilder to chain the calls.
Applies to
Azure SDK for .NET