You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: azure-monitor-opentelemetry/README.md
+21-18
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ This distro automatically installs the following libraries:
11
11
12
12
OpenTelemetry instrumentations allow automatic collection of requests sent from underlying instrumented libraries. The following is a list of OpenTelemetry instrumentations that come bundled in with the Azure monitor distro. If you would like to add support for another OpenTelemetry instrumentation, please submit a feature [request][distro_feature_request]. In the meantime, you can use the OpenTelemetry instrumentation manually via it's own APIs (i.e. `instrument()`) in your code. See [this][samples_manual] for an example.
You can use `configure_azure_monitor` to set up instrumentation for your app to Azure Monitor. `configure_azure_monitor` supports the following optional arguments:
54
54
55
-
* connection_string - The [connection string][connection_string_doc] for your Application Insights resource. The connection string will be automatically populated from the `APPLICATIONINSIGHTS_CONNECTION_STRING` environment variable if not explicitly passed in.
56
-
* disable_logging - If set to `True`, disables collection and export of logging telemetry. Defaults to `False`.
57
-
* disable_metrics - If set to `True`, disables collection and export of metric telemetry. Defaults to `False`.
58
-
* disable_tracing - If set to `True`, disables collection and export of distributed tracing telemetry. Defaults to `False`.
59
-
* exclude_instrumentations - By default, all supported [instrumentations](#officially-supported-instrumentations) are enabled to collect telemetry. Specify instrumentations you do not want to enable to collect telemetry by passing in a comma separated list of instrumented library names. e.g. `["requests", "flask"]`
60
-
* instrumentation_config - Specifies a dictionary of kwargs that will be applied to instrumentation configuration. You can specify which instrumentation you want to configure by name in the key field and value as a dictionary representing `kwargs` for the corresponding instrumentation.
61
-
Refer to the `Supported Library` section [above](#officially-supported-instrumentations) for the list of suppoprted library names.
|`connection_string`| The [connection string][connection_string_doc] for your Application Insights resource. The connection string will be automatically populated from the `APPLICATIONINSIGHTS_CONNECTION_STRING` environment variable if not explicitly passed in. |`APPLICATIONINSIGHTS_CONNECTION_STRING`|
58
+
|`exclude_instrumentations`| By default, all supported [instrumentations](#officially-supported-instrumentations) are enabled to collect telemetry. Specify instrumentations you do not want to enable to collect telemetry by passing in a comma separated list of instrumented library names. e.g. `["requests", "flask"]`||
59
+
|`resource`| Specifies the OpenTelemetry [resource][opentelemetry_spec_resource] associated with your application. See [this][ot_sdk_python_resource] for default behavior. |[OTEL_SERVICE_NAME][opentelemetry_spec_service_name], [OTEL_RESOURCE_ATTRIBUTES][opentelemetry_spec_resource_attributes]|
60
+
|`disable_logging`| If set to `True`, disables collection and export of logging telemetry. Defaults to `False`. ||
61
+
|`disable_metrics`| If set to `True`, disables collection and export of metric telemetry. Defaults to `False`. ||
62
+
|`disable_tracing`| If set to `True`, disables collection and export of distributed tracing telemetry. Defaults to `False`. ||
63
+
|`logging_level`| Specifies the [logging level][logging_level] of the logs you would like to collect for your logging pipeline. Defaults to 0 which is `logging.NOTSET`. ||
64
+
|`logger_name`| Specifies the [logger name][logger_name_hierarchy_doc] under which logging will be instrumented. Defaults to "" which corresponds to the root logger. ||
65
+
|`logging_export_interval_ms`| Specifies the logging export interval in milliseconds. Defaults to 5000. |`OTEL_BLRP_SCHEDULE_DELAY`|
66
+
|`metric_readers`| Specifies the [metric readers][ot_metric_reader] that you would like to use for your metric pipeline. Accepts a list of [metric readers][ot_sdk_python_metric_reader]. ||
67
+
|`views`| Specifies the list of [views][opentelemetry_spec_view] to configure for the metric pipeline. See [here][ot_sdk_python_view_examples] for example usage. ||
68
+
|`sampling_ratio`| Specifies the ratio of distributed tracing telemetry to be [sampled][application_insights_sampling]. Accepted values are in the range [0,1]. Defaults to 1.0, meaning no telemetry is sampled out. |`OTEL_TRACES_SAMPLER_ARG`|
69
+
|`tracing_export_interval_ms`| Specifies the distributed tracing export interval in milliseconds. Defaults to 5000. |`OTEL_BSP_SCHEDULE_DELAY`|
70
+
|`instrumentation_config`| Specifies a dictionary of kwargs that will be applied to instrumentation configuration. You can specify which instrumentation you want to configure by name in the key field and value as a dictionary representing `kwargs` for the corresponding instrumentation. Refer to the `Supported Library` section [above](#officially-supported-instrumentations) for the list of supported library names. ||
71
+
72
+
Example for use of `instrumentation_config`:
63
73
```python
64
74
...
65
75
configure_azure_monitor(
@@ -78,15 +88,6 @@ configure_azure_monitor(
78
88
79
89
Take a look at the specific [instrumenation][ot_instrumentations] documentation for available configurations.
80
90
81
-
* resource - Specified the OpenTelemetry [resource][opentelemetry_spec_resource] associated with your application. See [this][ot_sdk_python_resource] for default behavior.
82
-
* logging_level - Specifies the [logging level][logging_level] of the logs you would like to collect for your logging pipeline. Defaults to logging.NOTSET.
83
-
* logger_name = Specifies the [logger name][logger_name_hierarchy_doc] under which logging will be instrumented. Defaults to "" which corresponds to the root logger.
84
-
* logging_export_interval_ms - Specifies the logging export interval in milliseconds. Defaults to 5000.
85
-
* metric_readers - Specifies the [metric readers][ot_metric_reader] that you would like to use for your metric pipeline. Accepts a list of [metric readers][ot_sdk_python_metric_reader].
86
-
* views - Specifies the list of [views][opentelemetry_spec_view] to configure for the metric pipeline. See [here][ot_sdk_python_view_examples] for example usage.
87
-
* sampling_ratio - Specifies the ratio of distributed tracing telemetry to be [sampled][application_insights_sampling]. Accepted values are in the range [0,1]. Defaults to 1.0, meaning no telemetry is sampled out.
88
-
* tracing_export_interval_ms - Specifies the distributed tracing export interval in milliseconds. Defaults to 5000.
You can pass Azure monitor OpenTelemetry exporter configuration parameters directly into `configure_azure_monitor`. See additional [configuration related to exporting here][exporter_configuration_docs].
@@ -143,6 +144,8 @@ Samples are available [here][samples] to demonstrate how to utilize the above co
0 commit comments