azure.monitor.opentelemetry.exporter package¶
-
class
azure.monitor.opentelemetry.exporter.
AzureMonitorLogExporter
(**kwargs: Any)[source]¶ Azure Monitor Log exporter for OpenTelemetry.
Azure Monitor base exporter for OpenTelemetry.
- Keyword Arguments
api_version (str) – The service API version used. Defaults to latest.
- Return type
-
export
(batch: Sequence[opentelemetry.sdk._logs.LogData], **kwargs: Any) → opentelemetry.sdk._logs.export.LogExportResult[source]¶ Export log data :param batch: Open Telemetry LogData(s) to export. :type batch: Sequence[~opentelemetry._logs.LogData] :rtype: ~opentelemetry.sdk._logs.export.LogData
-
classmethod
from_connection_string
(conn_str: str, **kwargs: Any) → azure.monitor.opentelemetry.exporter.export.logs._exporter.AzureMonitorLogExporter[source]¶ Create an AzureMonitorLogExporter 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.
- Parameters
conn_str (str) – The connection string to be used for authentication.
- Keyword Arguments
api_version (str) – The service API version used. Defaults to latest.
:returns an instance of ~AzureMonitorLogExporter
-
class
azure.monitor.opentelemetry.exporter.
AzureMonitorMetricExporter
(**kwargs: Any)[source]¶ Azure Monitor Metric exporter for OpenTelemetry.
Azure Monitor base exporter for OpenTelemetry.
- Keyword Arguments
api_version (str) – The service API version used. Defaults to latest.
- Return type
-
export
(metrics_data: opentelemetry.sdk.metrics.export.MetricsData, timeout_millis: float = 10000, **kwargs: Any) → opentelemetry.sdk.metrics.export.MetricExportResult[source]¶ Exports a batch of metric data :param metrics: Open Telemetry Metric(s) to export. :type metrics_data: Sequence[~opentelemetry.sdk.metrics._internal.point.MetricsData] :rtype: ~opentelemetry.sdk.metrics.export.MetricExportResult
-
classmethod
from_connection_string
(conn_str: str, **kwargs: Any) → azure.monitor.opentelemetry.exporter.export.metrics._exporter.AzureMonitorMetricExporter[source]¶ Create an AzureMonitorMetricExporter 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.
- Parameters
conn_str (str) – The connection string to be used for authentication.
- Keyword Arguments
api_version (str) – The service API version used. Defaults to latest.
:returns an instance of ~AzureMonitorMetricExporter
-
class
azure.monitor.opentelemetry.exporter.
AzureMonitorTraceExporter
(**kwargs: Any)[source]¶ Azure Monitor Trace exporter for OpenTelemetry.
Azure Monitor base exporter for OpenTelemetry.
- Keyword Arguments
api_version (str) – The service API version used. Defaults to latest.
- Return type
-
export
(spans: Sequence[opentelemetry.trace.span.Span], **kwargs: Any) → opentelemetry.sdk.trace.export.SpanExportResult[source]¶ Export span data :param spans: Open Telemetry Spans to export. :type spans: Sequence[~opentelemetry.trace.Span] :rtype: ~opentelemetry.sdk.trace.export.SpanExportResult
-
classmethod
from_connection_string
(conn_str: str, **kwargs: Any) → azure.monitor.opentelemetry.exporter.export.trace._exporter.AzureMonitorTraceExporter[source]¶ 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.
- Parameters
conn_str (str) – The connection string to be used for authentication.
- Keyword Arguments
api_version (str) – The service API version used. Defaults to latest.
:returns an instance of ~AzureMonitorTraceExporter