microsoft.opentelemetry.exporter.azuremonitor.export.trace package

class microsoft.opentelemetry.exporter.azuremonitor.export.trace.AzureMonitorSpanExporter(**options)[source]

Azure Monitor span exporter for OpenTelemetry.

Parameters

optionsexport.options to allow configuration for the exporter

add_telemetry_processor(processor: Callable[…, any])None

Adds telemetry processor to the collection.

Telemetry processors will be called one by one before telemetry item is pushed for sending and in the order they were added.

Parameters

processor – Processor to add

clear_telemetry_processors()None

Removes all telemetry processors

export(spans: Sequence[opentelemetry.trace.span.Span]) → opentelemetry.sdk.trace.export.SpanExportResult[source]

Exports a batch of telemetry data.

Parameters

spans – The list of opentelemetry.trace.Span objects to be exported

Returns

The result of the export

shutdown()None

Shuts down the exporter.

Called when the SDK is shut down.

microsoft.opentelemetry.exporter.azuremonitor.export.trace.convert_span_to_envelope(span: opentelemetry.trace.span.Span) → microsoft.opentelemetry.exporter.azuremonitor._generated.models._models_py3.TelemetryItem[source]
microsoft.opentelemetry.exporter.azuremonitor.export.trace.indicate_processed_by_metric_extractors(envelope)[source]