@@ -496,6 +496,7 @@ def test_customize_span_exporter_sigv4(self):
496
496
OTLPAwsSpanExporter ,
497
497
AwsAuthSession ,
498
498
Compression .NoCompression ,
499
+ Resource .get_empty (),
499
500
)
500
501
501
502
for config in bad_configs :
@@ -506,6 +507,7 @@ def test_customize_span_exporter_sigv4(self):
506
507
OTLPSpanExporter ,
507
508
Session ,
508
509
Compression .NoCompression ,
510
+ Resource .get_empty (),
509
511
)
510
512
511
513
self .assertIsInstance (
@@ -610,12 +612,12 @@ def test_customize_logs_exporter_sigv4(self):
610
612
)
611
613
612
614
self .assertIsInstance (
613
- _customize_logs_exporter (OTLPGrpcLogExporter (), Resource . get_empty () ), OTLPGrpcLogExporter
615
+ _customize_logs_exporter (OTLPGrpcLogExporter ()), OTLPGrpcLogExporter
614
616
)
615
617
616
618
# Need to patch all of these to prevent some weird multi-threading error with the LogProvider
617
619
@patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator.LoggingHandler" , return_value = MagicMock ())
618
- @patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator .getLogger" , return_value = MagicMock ())
620
+ @patch ("logging .getLogger" , return_value = MagicMock ())
619
621
@patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator._customize_logs_exporter" )
620
622
@patch ("amazon.opentelemetry.distro.aws_opentelemetry_configurator.LoggerProvider" , return_value = MagicMock ())
621
623
@patch (
@@ -832,12 +834,13 @@ def customize_exporter_test(
832
834
expected_exporter_type ,
833
835
expected_session ,
834
836
expected_compression ,
837
+ * args
835
838
):
836
839
for key , value in config .items ():
837
840
os .environ [key ] = value
838
841
839
842
try :
840
- result = executor (default_exporter , Resource . get_empty () )
843
+ result = executor (default_exporter , * args )
841
844
self .assertIsInstance (result , expected_exporter_type )
842
845
self .assertIsInstance (result ._session , expected_session )
843
846
self .assertEqual (result ._compression , expected_compression )
0 commit comments