Skip to content

Commit 2868de7

Browse files
committed
adds NoOpTracerProvider test case for falcon instrumentation
Signed-off-by: Shwejan Raj, Bhupathi <[email protected]> Signed-off-by: Bhupathi Shwejan Raj <[email protected]>
1 parent ad29af3 commit 2868de7

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
@@ -426,6 +426,20 @@ def test_uninstrument(self):
426426
spans = self.memory_exporter.get_finished_spans()
427427
self.assertEqual(len(spans), 0)
428428

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

0 commit comments

Comments
 (0)