AzureMonitorTraceExporter Class

Azure Monitor Trace exporter for OpenTelemetry.

Inheritance
azure.monitor.opentelemetry.exporter.export._base.BaseExporter
AzureMonitorTraceExporter
opentelemetry.sdk.trace.export.SpanExporter
AzureMonitorTraceExporter

Constructor

AzureMonitorTraceExporter(**kwargs: Any)

Methods

export

Export span data :param spans: Open Telemetry Spans to export. :type spans: Sequence[~opentelemetry.trace.Span] :rtype: ~opentelemetry.sdk.trace.export.SpanExportResult

from_connection_string

Create an AzureMonitorTraceExporter from a connection string.

This is the recommended way of instantation if a connection string is passed in explicitly. If a user wants to use a connection string provided by environment variable, the constructor of the exporter can be called directly.

:returns an instance of ~AzureMonitorTraceExporter

shutdown

Shuts down the exporter.

Called when the SDK is shut down.

export

Export span data :param spans: Open Telemetry Spans to export. :type spans: Sequence[~opentelemetry.trace.Span] :rtype: ~opentelemetry.sdk.trace.export.SpanExportResult

export(spans: Sequence[opentelemetry.trace.span.Span], **kwargs: Any) -> opentelemetry.sdk.trace.export.SpanExportResult

Parameters

spans
Required

from_connection_string

Create an AzureMonitorTraceExporter from a connection string.

This is the recommended way of instantation if a connection string is passed in explicitly. If a user wants to use a connection string provided by environment variable, the constructor of the exporter can be called directly.

:returns an instance of ~AzureMonitorTraceExporter

from_connection_string(conn_str: str, **kwargs: Any) -> azure.monitor.opentelemetry.exporter.export.trace._exporter.AzureMonitorTraceExporter

Parameters

conn_str
str
Required

The connection string to be used for authentication.

api_version
str

The service API version used. Defaults to latest.

shutdown

Shuts down the exporter.

Called when the SDK is shut down.

shutdown() -> None