Skip to content

Commit 72aed10

Browse files
authored
Fix recursing logging (Azure#44828)
1 parent e12afb9 commit 72aed10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/main/java/com/azure/monitor/opentelemetry/autoconfigure/AzureMonitorLogRecordExporter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
class AzureMonitorLogRecordExporter implements LogRecordExporter {
2828

29-
private static final String EXPORTER_LOGGER_PREFIX = "com.azure.monitor.opentelemetry.exporter";
29+
private static final String AUTO_CONFIGURE_LOG_PREFIX = AzureMonitorAutoConfigure.class.getPackage().getName();
3030
private static final ClientLogger LOGGER = new ClientLogger(AzureMonitorLogRecordExporter.class);
3131
private static final OperationLogger OPERATION_LOGGER
3232
= new OperationLogger(AzureMonitorLogRecordExporter.class, "Exporting log");
@@ -59,7 +59,7 @@ public CompletableResultCode export(Collection<LogRecordData> logs) {
5959
List<TelemetryItem> telemetryItems = new ArrayList<>();
6060
for (LogRecordData log : logs) {
6161
// TODO (heya) consider using suppress_instrumentation https://github.com/open-telemetry/opentelemetry-java/pull/6546 later when available
62-
if (log.getInstrumentationScopeInfo().getName().startsWith(EXPORTER_LOGGER_PREFIX)) {
62+
if (log.getInstrumentationScopeInfo().getName().startsWith(AUTO_CONFIGURE_LOG_PREFIX)) {
6363
continue;
6464
}
6565
LOGGER.verbose("exporting log: {}", log);

0 commit comments

Comments
 (0)