azure.monitor.opentelemetry package¶
- azure.monitor.opentelemetry.configure_azure_monitor(**kwargs) None[source]¶
This function works as a configuration layer that allows the end user to configure OpenTelemetry and Azure monitor components. The configuration can be done via arguments passed to this function.
- Keyword Arguments:
connection_string (str) – Connection string for your Application Insights resource.
credential (TokenCredential or None) – Token credential, such as ManagedIdentityCredential or ClientSecretCredential, used for Azure Active Directory (AAD) authentication. Defaults to None.
disable_offline_storage (bool) – Boolean value to determine whether to disable storing failed telemetry records for retry. Defaults to False.
logger_name (str) – The name of the Python logger that telemetry will be collected.
instrumentation_options (dict) – A nested dictionary that determines which instrumentations to enable or disable. Instrumentations are referred to by their Library Names. For example, {“azure_sdk”: {“enabled”: False}, “flask”: {“enabled”: False}, “django”: {“enabled”: True}} will disable Azure Core Tracing and the Flask instrumentation but leave Django and the other default instrumentations enabled.
resource (Resource) – OpenTelemetry Resource object. Passed in Resource Attributes take priority over default attributes and those from Resource Detectors.
span_processors (list[SpanProcessor]) – List of SpanProcessor objects to process every span prior to exporting. Will be run sequentially.
enable_live_metrics (bool) – Boolean value to determine whether to enable live metrics feature. Defaults to False.
storage_directory (str) – Storage directory in which to store retry files. Defaults to <tempfile.gettempdir()>/Microsoft/AzureMonitor/opentelemetry-python-<your-instrumentation-key>.
views (list[View]) – List of View objects to configure and filter metric output.
- Return type:
None