From c298ecb47308228c4658b69a0c285c27e4afe3a9 Mon Sep 17 00:00:00 2001 From: Hannah Jiang Date: Wed, 4 Jan 2023 22:52:00 -0500 Subject: [PATCH 1/2] Fixes #3088 updated import library for set_logger_provider --- docs/examples/logs/example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/logs/example.py b/docs/examples/logs/example.py index b2b15932625..d2db56b9e09 100644 --- a/docs/examples/logs/example.py +++ b/docs/examples/logs/example.py @@ -1,13 +1,13 @@ import logging from opentelemetry import trace +from opentelemetry._logs import set_logger_provider from opentelemetry.exporter.otlp.proto.grpc._log_exporter import ( OTLPLogExporter, ) from opentelemetry.sdk._logs import ( LoggerProvider, LoggingHandler, - set_logger_provider, ) from opentelemetry.sdk._logs.export import BatchLogRecordProcessor from opentelemetry.sdk.resources import Resource From 71e0fae3d3be19463e282ef26869e6aad72c4cb9 Mon Sep 17 00:00:00 2001 From: hannah-jj Date: Thu, 5 Jan 2023 22:23:55 -0500 Subject: [PATCH 2/2] Updated import format for LoggerProvider & LoggingHandler to conform to standards on isort tests. --- docs/examples/logs/example.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/examples/logs/example.py b/docs/examples/logs/example.py index d2db56b9e09..2505aacea7a 100644 --- a/docs/examples/logs/example.py +++ b/docs/examples/logs/example.py @@ -5,10 +5,7 @@ from opentelemetry.exporter.otlp.proto.grpc._log_exporter import ( OTLPLogExporter, ) -from opentelemetry.sdk._logs import ( - LoggerProvider, - LoggingHandler, -) +from opentelemetry.sdk._logs import LoggerProvider, LoggingHandler from opentelemetry.sdk._logs.export import BatchLogRecordProcessor from opentelemetry.sdk.resources import Resource from opentelemetry.sdk.trace import TracerProvider