summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-azure-monitor-opentelemetry-exporter.spec136
-rw-r--r--sources2
3 files changed, 72 insertions, 67 deletions
diff --git a/.gitignore b/.gitignore
index c2745aa..95e5a9a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/azure-monitor-opentelemetry-exporter-1.0.0b12.zip
+/azure-monitor-opentelemetry-exporter-1.0.0b13.zip
diff --git a/python-azure-monitor-opentelemetry-exporter.spec b/python-azure-monitor-opentelemetry-exporter.spec
index 029478e..e3047e4 100644
--- a/python-azure-monitor-opentelemetry-exporter.spec
+++ b/python-azure-monitor-opentelemetry-exporter.spec
@@ -1,25 +1,20 @@
%global _empty_manifest_terminate_build 0
Name: python-azure-monitor-opentelemetry-exporter
-Version: 1.0.0b12
+Version: 1.0.0b13
Release: 1
Summary: Microsoft Azure Monitor Opentelemetry Exporter Client Library for Python
License: MIT License
URL: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter
-Source0: https://mirrors.nju.edu.cn/pypi/web/packages/01/6a/5c58a29d598b18e19a56d94acff55aa26e1f30b81b043941e84462203056/azure-monitor-opentelemetry-exporter-1.0.0b12.zip
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c7/a2/ddd9b04262f5c69235305a1b4138f85d1dda5e1715784819dccbccf91602/azure-monitor-opentelemetry-exporter-1.0.0b13.zip
BuildArch: noarch
-Requires: python3-azure-core
-Requires: python3-fixedint
-Requires: python3-msrest
-Requires: python3-opentelemetry-api
-Requires: python3-opentelemetry-sdk
%description
# Microsoft OpenTelemetry exporter for Azure Monitor
The exporter for Azure Monitor allows you to export data utilizing the OpenTelemetry SDK and send telemetry data to Azure Monitor for applications written in Python.
-[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter) | [Package (PyPi)][pypi] | [API reference documentation][api_docs] | [Product documentation][product_docs] | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter/samples) | [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md)
+[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter) | [Package (PyPi)][pypi] | [API reference documentation][api_docs] | [Product documentation][product_docs] | [Samples][exporter_samples] | [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md)
## Getting started
@@ -49,7 +44,7 @@ Please find the samples linked below for demonstration as to how to construct th
NOTE: The logging signal for the `AzureMonitorLogExporter` is currently in an EXPERIMENTAL state. Possible breaking changes may ensue in the future.
-```Python
+```python
from azure.monitor.opentelemetry.exporter import AzureMonitorLogExporter
exporter = AzureMonitorLogExporter(
connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
@@ -58,7 +53,7 @@ exporter = AzureMonitorLogExporter(
#### Metrics
-```Python
+```python
from azure.monitor.opentelemetry.exporter import AzureMonitorMetricExporter
exporter = AzureMonitorMetricExporter(
connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
@@ -67,7 +62,7 @@ exporter = AzureMonitorMetricExporter(
#### Tracing
-```Python
+```python
from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter
exporter = AzureMonitorTraceExporter(
connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
@@ -152,6 +147,7 @@ All configuration options can be passed through the constructors of exporters th
* `connection_string`: The connection string used for your Application Insights resource.
* `disable_offline_storage`: Boolean value to determine whether to disable storing failed telemetry records for retry. Defaults to `False`.
* `storage_directory`: Storage directory in which to store retry files. Defaults to `<tempfile.gettempdir()>/Microsoft/AzureMonitor/opentelemetry-python-<your-instrumentation-key>`.
+* `credential`: Token credential, such as ManagedIdentityCredential or ClientSecretCredential, used for [Azure Active Directory (AAD) authentication][aad_for_ai_docs]. Defaults to None. See [samples][exporter_samples] for examples.
## Examples
@@ -170,7 +166,7 @@ Review the [OpenTelemetry Logging SDK][ot_logging_sdk] to learn how to use OpenT
#### Export Hello World Log
-```Python
+```python
"""
An example to show an application using Opentelemetry logging sdk. Logging calls to the standard Python
logging library are tracked and telemetry is exported to application insights with the AzureMonitorLogExporter.
@@ -208,7 +204,7 @@ logger.warning("Hello World!")
#### Export Correlated Log
-```Python
+```python
"""
An example showing how to include context correlation information in logging telemetry.
"""
@@ -252,7 +248,7 @@ logger.error("ERROR: After span")
#### Export Custom Properties Log
-```Python
+```python
"""
An example showing how to add custom properties to logging telemetry.
"""
@@ -290,7 +286,7 @@ logger.debug("DEBUG: Debug with properties", extra={"debug": "true"})
#### Export Exceptions Log
-```Python
+```python
"""
An example showing how to export exception telemetry using the AzureMonitorLogExporter.
"""
@@ -526,7 +522,7 @@ Review the [OpenTelemetry Tracing SDK][ot_tracing_sdk] to learn how to use OpenT
#### Export Hello World Trace
-```Python
+```python
"""
An example to show an application using Opentelemetry tracing api and sdk. Custom dependencies are
tracked via spans and telemetry is exported to application insights with the AzureMonitorTraceExporter.
@@ -560,7 +556,7 @@ This example shows how to instrument with the [requests](https://pypi.org/projec
* Install the requests instrumentation package using pip install opentelemetry-instrumentation-requests.
-```Python
+```python
"""
An example to show an application instrumented with the OpenTelemetry requests instrumentation.
Calls made with the requests library will be automatically tracked and telemetry is exported to
@@ -595,7 +591,7 @@ response = requests.get(url="https://azure.microsoft.com/")
You can enable sampling to limit the amount of telemetry records you receive. In order to enable correct sampling in Application Insights, use the `ApplicationInsightsSampler` as shown below.
-```Python
+```python
"""
An example to show an application using the ApplicationInsightsSampler to enable sampling for your telemetry.
Specify a sampling rate for the sampler to limit the amount of telemetry records you receive. Custom dependencies
@@ -635,7 +631,7 @@ The exporter raises exceptions defined in [Azure Core](https://github.com/Azure/
### More sample code
-Please find further examples in the [samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter/samples) directory demonstrating common scenarios.
+Please find further examples in the [samples][exporter_samples] directory demonstrating common scenarios.
### Additional documentation
@@ -645,7 +641,7 @@ For detailed overview of OpenTelemetry, visit their [overview](https://github.co
For the official OpenTelemetry Python documentation and how to enable other telemetry scenarios, visit the official OpenTelemetry [website](https://opentelemetry.io/docs/instrumentation/python/).
-For more information on the Azure Monitor OpenTelemetry Distro, which is a bundle of useful, pre-assembled components (one of them being this current package) that enable telemetry scenarios with Azure Monitor, visit the [README](https://github.com/microsoft/ApplicationInsights-Python/tree/main/azure-monitor-opentelemetry-distro).
+For more information on the Azure Monitor OpenTelemetry Distro, which is a bundle of useful, pre-assembled components (one of them being this current package) that enable telemetry scenarios with Azure Monitor, visit the [README](https://github.com/microsoft/ApplicationInsights-Python/tree/main/azure-monitor-opentelemetry).
## Contributing
@@ -662,7 +658,9 @@ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
<!-- LINKS -->
+[aad_for_ai_docs]: https://learn.microsoft.com/azure/azure-monitor/app/azure-ad-authentication?tabs=python
[api_docs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-opentelemetry-exporter-azuremonitor/1.0.0b2/index.html
+[exporter_samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter/samples
[product_docs]: https://docs.microsoft.com/azure/azure-monitor/overview
[azure_sub]: https://azure.microsoft.com/free/
[pip]: https://pypi.org/project/pip/
@@ -673,13 +671,13 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio
[opentelemetry_spec]: https://opentelemetry.io/
[instrumentation_library]: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#instrumentation-libraries
[log_concept]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#log-signal
-[log_record]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LogRecord
-[logger]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.Logger
-[logger_provider]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LoggerProvider
-[log_record_processor]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LogRecordProcessor
-[logging_handler]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LoggingHandler
+[log_record]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.LogRecord
+[logger]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.Logger
+[logger_provider]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.LoggerProvider
+[log_record_processor]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.LogRecordProcessor
+[logging_handler]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.LoggingHandler
[log_reference]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/logs/_exporter.py
-[ot_logging_sdk]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html
+[ot_logging_sdk]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html
[metric_concept]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#metric-signal
[measurement]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#measurement
[instrument]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#instrument
@@ -709,7 +707,7 @@ BuildRequires: python3-pip
The exporter for Azure Monitor allows you to export data utilizing the OpenTelemetry SDK and send telemetry data to Azure Monitor for applications written in Python.
-[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter) | [Package (PyPi)][pypi] | [API reference documentation][api_docs] | [Product documentation][product_docs] | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter/samples) | [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md)
+[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter) | [Package (PyPi)][pypi] | [API reference documentation][api_docs] | [Product documentation][product_docs] | [Samples][exporter_samples] | [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md)
## Getting started
@@ -739,7 +737,7 @@ Please find the samples linked below for demonstration as to how to construct th
NOTE: The logging signal for the `AzureMonitorLogExporter` is currently in an EXPERIMENTAL state. Possible breaking changes may ensue in the future.
-```Python
+```python
from azure.monitor.opentelemetry.exporter import AzureMonitorLogExporter
exporter = AzureMonitorLogExporter(
connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
@@ -748,7 +746,7 @@ exporter = AzureMonitorLogExporter(
#### Metrics
-```Python
+```python
from azure.monitor.opentelemetry.exporter import AzureMonitorMetricExporter
exporter = AzureMonitorMetricExporter(
connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
@@ -757,7 +755,7 @@ exporter = AzureMonitorMetricExporter(
#### Tracing
-```Python
+```python
from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter
exporter = AzureMonitorTraceExporter(
connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
@@ -842,6 +840,7 @@ All configuration options can be passed through the constructors of exporters th
* `connection_string`: The connection string used for your Application Insights resource.
* `disable_offline_storage`: Boolean value to determine whether to disable storing failed telemetry records for retry. Defaults to `False`.
* `storage_directory`: Storage directory in which to store retry files. Defaults to `<tempfile.gettempdir()>/Microsoft/AzureMonitor/opentelemetry-python-<your-instrumentation-key>`.
+* `credential`: Token credential, such as ManagedIdentityCredential or ClientSecretCredential, used for [Azure Active Directory (AAD) authentication][aad_for_ai_docs]. Defaults to None. See [samples][exporter_samples] for examples.
## Examples
@@ -860,7 +859,7 @@ Review the [OpenTelemetry Logging SDK][ot_logging_sdk] to learn how to use OpenT
#### Export Hello World Log
-```Python
+```python
"""
An example to show an application using Opentelemetry logging sdk. Logging calls to the standard Python
logging library are tracked and telemetry is exported to application insights with the AzureMonitorLogExporter.
@@ -898,7 +897,7 @@ logger.warning("Hello World!")
#### Export Correlated Log
-```Python
+```python
"""
An example showing how to include context correlation information in logging telemetry.
"""
@@ -942,7 +941,7 @@ logger.error("ERROR: After span")
#### Export Custom Properties Log
-```Python
+```python
"""
An example showing how to add custom properties to logging telemetry.
"""
@@ -980,7 +979,7 @@ logger.debug("DEBUG: Debug with properties", extra={"debug": "true"})
#### Export Exceptions Log
-```Python
+```python
"""
An example showing how to export exception telemetry using the AzureMonitorLogExporter.
"""
@@ -1216,7 +1215,7 @@ Review the [OpenTelemetry Tracing SDK][ot_tracing_sdk] to learn how to use OpenT
#### Export Hello World Trace
-```Python
+```python
"""
An example to show an application using Opentelemetry tracing api and sdk. Custom dependencies are
tracked via spans and telemetry is exported to application insights with the AzureMonitorTraceExporter.
@@ -1250,7 +1249,7 @@ This example shows how to instrument with the [requests](https://pypi.org/projec
* Install the requests instrumentation package using pip install opentelemetry-instrumentation-requests.
-```Python
+```python
"""
An example to show an application instrumented with the OpenTelemetry requests instrumentation.
Calls made with the requests library will be automatically tracked and telemetry is exported to
@@ -1285,7 +1284,7 @@ response = requests.get(url="https://azure.microsoft.com/")
You can enable sampling to limit the amount of telemetry records you receive. In order to enable correct sampling in Application Insights, use the `ApplicationInsightsSampler` as shown below.
-```Python
+```python
"""
An example to show an application using the ApplicationInsightsSampler to enable sampling for your telemetry.
Specify a sampling rate for the sampler to limit the amount of telemetry records you receive. Custom dependencies
@@ -1325,7 +1324,7 @@ The exporter raises exceptions defined in [Azure Core](https://github.com/Azure/
### More sample code
-Please find further examples in the [samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter/samples) directory demonstrating common scenarios.
+Please find further examples in the [samples][exporter_samples] directory demonstrating common scenarios.
### Additional documentation
@@ -1335,7 +1334,7 @@ For detailed overview of OpenTelemetry, visit their [overview](https://github.co
For the official OpenTelemetry Python documentation and how to enable other telemetry scenarios, visit the official OpenTelemetry [website](https://opentelemetry.io/docs/instrumentation/python/).
-For more information on the Azure Monitor OpenTelemetry Distro, which is a bundle of useful, pre-assembled components (one of them being this current package) that enable telemetry scenarios with Azure Monitor, visit the [README](https://github.com/microsoft/ApplicationInsights-Python/tree/main/azure-monitor-opentelemetry-distro).
+For more information on the Azure Monitor OpenTelemetry Distro, which is a bundle of useful, pre-assembled components (one of them being this current package) that enable telemetry scenarios with Azure Monitor, visit the [README](https://github.com/microsoft/ApplicationInsights-Python/tree/main/azure-monitor-opentelemetry).
## Contributing
@@ -1352,7 +1351,9 @@ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
<!-- LINKS -->
+[aad_for_ai_docs]: https://learn.microsoft.com/azure/azure-monitor/app/azure-ad-authentication?tabs=python
[api_docs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-opentelemetry-exporter-azuremonitor/1.0.0b2/index.html
+[exporter_samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter/samples
[product_docs]: https://docs.microsoft.com/azure/azure-monitor/overview
[azure_sub]: https://azure.microsoft.com/free/
[pip]: https://pypi.org/project/pip/
@@ -1363,13 +1364,13 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio
[opentelemetry_spec]: https://opentelemetry.io/
[instrumentation_library]: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#instrumentation-libraries
[log_concept]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#log-signal
-[log_record]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LogRecord
-[logger]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.Logger
-[logger_provider]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LoggerProvider
-[log_record_processor]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LogRecordProcessor
-[logging_handler]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LoggingHandler
+[log_record]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.LogRecord
+[logger]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.Logger
+[logger_provider]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.LoggerProvider
+[log_record_processor]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.LogRecordProcessor
+[logging_handler]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.LoggingHandler
[log_reference]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/logs/_exporter.py
-[ot_logging_sdk]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html
+[ot_logging_sdk]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html
[metric_concept]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#metric-signal
[measurement]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#measurement
[instrument]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#instrument
@@ -1396,7 +1397,7 @@ Provides: python3-azure-monitor-opentelemetry-exporter-doc
The exporter for Azure Monitor allows you to export data utilizing the OpenTelemetry SDK and send telemetry data to Azure Monitor for applications written in Python.
-[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter) | [Package (PyPi)][pypi] | [API reference documentation][api_docs] | [Product documentation][product_docs] | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter/samples) | [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md)
+[Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter) | [Package (PyPi)][pypi] | [API reference documentation][api_docs] | [Product documentation][product_docs] | [Samples][exporter_samples] | [Changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/CHANGELOG.md)
## Getting started
@@ -1426,7 +1427,7 @@ Please find the samples linked below for demonstration as to how to construct th
NOTE: The logging signal for the `AzureMonitorLogExporter` is currently in an EXPERIMENTAL state. Possible breaking changes may ensue in the future.
-```Python
+```python
from azure.monitor.opentelemetry.exporter import AzureMonitorLogExporter
exporter = AzureMonitorLogExporter(
connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
@@ -1435,7 +1436,7 @@ exporter = AzureMonitorLogExporter(
#### Metrics
-```Python
+```python
from azure.monitor.opentelemetry.exporter import AzureMonitorMetricExporter
exporter = AzureMonitorMetricExporter(
connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
@@ -1444,7 +1445,7 @@ exporter = AzureMonitorMetricExporter(
#### Tracing
-```Python
+```python
from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter
exporter = AzureMonitorTraceExporter(
connection_string=os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]
@@ -1529,6 +1530,7 @@ All configuration options can be passed through the constructors of exporters th
* `connection_string`: The connection string used for your Application Insights resource.
* `disable_offline_storage`: Boolean value to determine whether to disable storing failed telemetry records for retry. Defaults to `False`.
* `storage_directory`: Storage directory in which to store retry files. Defaults to `<tempfile.gettempdir()>/Microsoft/AzureMonitor/opentelemetry-python-<your-instrumentation-key>`.
+* `credential`: Token credential, such as ManagedIdentityCredential or ClientSecretCredential, used for [Azure Active Directory (AAD) authentication][aad_for_ai_docs]. Defaults to None. See [samples][exporter_samples] for examples.
## Examples
@@ -1547,7 +1549,7 @@ Review the [OpenTelemetry Logging SDK][ot_logging_sdk] to learn how to use OpenT
#### Export Hello World Log
-```Python
+```python
"""
An example to show an application using Opentelemetry logging sdk. Logging calls to the standard Python
logging library are tracked and telemetry is exported to application insights with the AzureMonitorLogExporter.
@@ -1585,7 +1587,7 @@ logger.warning("Hello World!")
#### Export Correlated Log
-```Python
+```python
"""
An example showing how to include context correlation information in logging telemetry.
"""
@@ -1629,7 +1631,7 @@ logger.error("ERROR: After span")
#### Export Custom Properties Log
-```Python
+```python
"""
An example showing how to add custom properties to logging telemetry.
"""
@@ -1667,7 +1669,7 @@ logger.debug("DEBUG: Debug with properties", extra={"debug": "true"})
#### Export Exceptions Log
-```Python
+```python
"""
An example showing how to export exception telemetry using the AzureMonitorLogExporter.
"""
@@ -1903,7 +1905,7 @@ Review the [OpenTelemetry Tracing SDK][ot_tracing_sdk] to learn how to use OpenT
#### Export Hello World Trace
-```Python
+```python
"""
An example to show an application using Opentelemetry tracing api and sdk. Custom dependencies are
tracked via spans and telemetry is exported to application insights with the AzureMonitorTraceExporter.
@@ -1937,7 +1939,7 @@ This example shows how to instrument with the [requests](https://pypi.org/projec
* Install the requests instrumentation package using pip install opentelemetry-instrumentation-requests.
-```Python
+```python
"""
An example to show an application instrumented with the OpenTelemetry requests instrumentation.
Calls made with the requests library will be automatically tracked and telemetry is exported to
@@ -1972,7 +1974,7 @@ response = requests.get(url="https://azure.microsoft.com/")
You can enable sampling to limit the amount of telemetry records you receive. In order to enable correct sampling in Application Insights, use the `ApplicationInsightsSampler` as shown below.
-```Python
+```python
"""
An example to show an application using the ApplicationInsightsSampler to enable sampling for your telemetry.
Specify a sampling rate for the sampler to limit the amount of telemetry records you receive. Custom dependencies
@@ -2012,7 +2014,7 @@ The exporter raises exceptions defined in [Azure Core](https://github.com/Azure/
### More sample code
-Please find further examples in the [samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter/samples) directory demonstrating common scenarios.
+Please find further examples in the [samples][exporter_samples] directory demonstrating common scenarios.
### Additional documentation
@@ -2022,7 +2024,7 @@ For detailed overview of OpenTelemetry, visit their [overview](https://github.co
For the official OpenTelemetry Python documentation and how to enable other telemetry scenarios, visit the official OpenTelemetry [website](https://opentelemetry.io/docs/instrumentation/python/).
-For more information on the Azure Monitor OpenTelemetry Distro, which is a bundle of useful, pre-assembled components (one of them being this current package) that enable telemetry scenarios with Azure Monitor, visit the [README](https://github.com/microsoft/ApplicationInsights-Python/tree/main/azure-monitor-opentelemetry-distro).
+For more information on the Azure Monitor OpenTelemetry Distro, which is a bundle of useful, pre-assembled components (one of them being this current package) that enable telemetry scenarios with Azure Monitor, visit the [README](https://github.com/microsoft/ApplicationInsights-Python/tree/main/azure-monitor-opentelemetry).
## Contributing
@@ -2039,7 +2041,9 @@ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
<!-- LINKS -->
+[aad_for_ai_docs]: https://learn.microsoft.com/azure/azure-monitor/app/azure-ad-authentication?tabs=python
[api_docs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-opentelemetry-exporter-azuremonitor/1.0.0b2/index.html
+[exporter_samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-opentelemetry-exporter/samples
[product_docs]: https://docs.microsoft.com/azure/azure-monitor/overview
[azure_sub]: https://azure.microsoft.com/free/
[pip]: https://pypi.org/project/pip/
@@ -2050,13 +2054,13 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio
[opentelemetry_spec]: https://opentelemetry.io/
[instrumentation_library]: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#instrumentation-libraries
[log_concept]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#log-signal
-[log_record]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LogRecord
-[logger]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.Logger
-[logger_provider]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LoggerProvider
-[log_record_processor]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LogRecordProcessor
-[logging_handler]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html#opentelemetry.sdk._logs.LoggingHandler
+[log_record]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.LogRecord
+[logger]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.Logger
+[logger_provider]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.LoggerProvider
+[log_record_processor]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.LogRecordProcessor
+[logging_handler]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html#opentelemetry.sdk._logs.LoggingHandler
[log_reference]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/logs/_exporter.py
-[ot_logging_sdk]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/logs.html
+[ot_logging_sdk]: https://opentelemetry-python.readthedocs.io/en/stable/sdk/_logs.html
[metric_concept]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/overview.md#metric-signal
[measurement]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#measurement
[instrument]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#instrument
@@ -2076,7 +2080,7 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio
%prep
-%autosetup -n azure-monitor-opentelemetry-exporter-1.0.0b12
+%autosetup -n azure-monitor-opentelemetry-exporter-1.0.0b13
%build
%py3_build
@@ -2116,5 +2120,5 @@ mv %{buildroot}/doclist.lst .
%{_docdir}/*
%changelog
-* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.0b12-1
+* Sun Apr 23 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.0b13-1
- Package Spec generated
diff --git a/sources b/sources
index dbe84af..e6cd261 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0e64123d7fa10471393eae16a9fb0b18 azure-monitor-opentelemetry-exporter-1.0.0b12.zip
+32516d0e5c11392cf2cc9407d2ce251a azure-monitor-opentelemetry-exporter-1.0.0b13.zip