File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
aws-opentelemetry-distro/tests/amazon/opentelemetry/distro Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 11# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22# SPDX-License-Identifier: Apache-2.0
3+ import logging
34import os
45import time
56from unittest import TestCase
@@ -87,6 +88,18 @@ def setUpClass(cls):
8788 def tearDown (self ):
8889 os .environ .pop ("OTEL_AWS_APPLICATION_SIGNALS_ENABLED" , None )
8990 os .environ .pop ("OTEL_AWS_APPLICATION_SIGNALS_RUNTIME_ENABLED" , None )
91+ root_logger = logging .getLogger ()
92+ for handler in root_logger .handlers [:]:
93+ handler .close ()
94+ root_logger .removeHandler (handler )
95+
96+ # Shut down any active exporters
97+ try :
98+ from opentelemetry .sdk ._logs import _internal
99+
100+ _internal .get_log_provider ().shutdown ()
101+ except (ImportError , AttributeError ):
102+ pass
90103
91104 # The probability of this passing once without correct IDs is low, 20 times is inconceivable.
92105 def test_provide_generate_xray_ids (self ):
You can’t perform that action at this time.
0 commit comments