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: sdk/monitor/azure-monitor-opentelemetry-exporter/README.md
+20-15Lines changed: 20 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -154,6 +154,14 @@ The following sections provide several code snippets covering some of the most c
154
154
155
155
Review the [OpenTelemetry Logging SDK][ot_logging_sdk] to learn how to use OpenTelemetry components to collect logs.
156
156
157
+
When integrating the `AzureMonitorLogExporter`, it's **strongly advised to utilize a named logger** rather
158
+
than the root logger.
159
+
This recommendation stems from the exporter's dependency on `azure-core` for constructing and dispatching requests.
160
+
Since `azure-core` itself uses a Python logger, attaching the handler to the root logger would
161
+
inadvertently capture and export these internal log messages as well.
162
+
This triggers a recursive loop of logging and exporting, leading to an unnecessary proliferation of log data.
163
+
To avoid this, configure a named logger for your application's logging needs or set up your logging handler to filter out logs originating from the SDK library.
0 commit comments