Skip to content

Commit c4347e0

Browse files
authored
adds NoOpTracerProvider test case for falcon instrumentation (#3382)
Signed-off-by: Shwejan Raj, Bhupathi <[email protected]> Signed-off-by: Bhupathi Shwejan Raj <[email protected]>
1 parent 0a03c9a commit c4347e0

File tree

1 file changed

+14
-0
lines changed
  • instrumentation/opentelemetry-instrumentation-falcon/tests

1 file changed

+14
-0
lines changed

instrumentation/opentelemetry-instrumentation-falcon/tests/test_falcon.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,20 @@ def test_uninstrument(self):
427427
spans = self.memory_exporter.get_finished_spans()
428428
self.assertEqual(len(spans), 0)
429429

430+
def test_no_op_tracer_provider(self):
431+
FalconInstrumentor().uninstrument()
432+
433+
FalconInstrumentor().instrument(
434+
tracer_provider=trace.NoOpTracerProvider()
435+
)
436+
437+
self.memory_exporter.clear()
438+
439+
self.client().simulate_get(path="/hello")
440+
441+
spans = self.memory_exporter.get_finished_spans()
442+
self.assertEqual(len(spans), 0)
443+
430444
def test_exclude_lists(self):
431445
self.client().simulate_get(path="/ping")
432446
span_list = self.memory_exporter.get_finished_spans()

0 commit comments

Comments
 (0)