File tree 1 file changed +13
-0
lines changed
instrumentation/opentelemetry-instrumentation-aiopg/tests
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,19 @@ def test_instrument_connection_after_instrument(self):
222
222
spans_list = self .memory_exporter .get_finished_spans ()
223
223
self .assertEqual (len (spans_list ), 1 )
224
224
225
+ def test_no_op_tracer_provider (self ):
226
+ cnx = async_call (aiopg .connect (database = "test" ))
227
+ AiopgInstrumentor ().instrument_connection (
228
+ cnx , tracer_provider = trace_api .NoOpTracerProvider ()
229
+ )
230
+
231
+ cursor = async_call (cnx .cursor ())
232
+ query = "SELECT * FROM test"
233
+ async_call (cursor .execute (query ))
234
+
235
+ spans_list = self .memory_exporter .get_finished_spans ()
236
+ self .assertEqual (len (spans_list ), 0 )
237
+
225
238
def test_custom_tracer_provider_instrument_connection (self ):
226
239
resource = resources .Resource .create (
227
240
{"service.name" : "db-test-service" }
You can’t perform that action at this time.
0 commit comments