From a6db5e517f482f02455a26e60dc037f1b94a4fab Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Thu, 12 May 2022 16:26:07 +0200 Subject: [PATCH] azure-monitor-opentelemetry-exporter update readme Update readme to reuse LogEmitterProvider in two examples rather than creating a new one. This matches other examples in the readme as well as samples --- sdk/monitor/azure-monitor-opentelemetry-exporter/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/README.md b/sdk/monitor/azure-monitor-opentelemetry-exporter/README.md index 8b65ccda66d0..2266934ce64b 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/README.md +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/README.md @@ -160,7 +160,7 @@ from azure.monitor.opentelemetry.exporter import AzureMonitorLogExporter trace.set_tracer_provider(TracerProvider()) tracer = trace.get_tracer(__name__) log_emitter_provider = LogEmitterProvider() -set_log_emitter_provider(LogEmitterProvider()) +set_log_emitter_provider(log_emitter_provider) exporter = AzureMonitorLogExporter.from_connection_string( os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"] @@ -197,7 +197,7 @@ from opentelemetry.sdk._logs.export import BatchLogProcessor from azure.monitor.opentelemetry.exporter import AzureMonitorLogExporter log_emitter_provider = LogEmitterProvider() -set_log_emitter_provider(LogEmitterProvider()) +set_log_emitter_provider(log_emitter_provider) exporter = AzureMonitorLogExporter.from_connection_string( os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"]