We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 009bdba commit fc1c8f0Copy full SHA for fc1c8f0
instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py
@@ -1069,6 +1069,18 @@ def test_uninstrument_after_instrument(self):
1069
spans = self.memory_exporter.get_finished_spans()
1070
self.assertEqual(len(spans), 3)
1071
1072
+ def test_no_op_tracer_provider(self):
1073
+ self._instrumentor.uninstrument()
1074
+ self._instrumentor.instrument(
1075
+ tracer_provider=trace.NoOpTracerProvider()
1076
+ )
1077
+
1078
+ app = self._create_fastapi_app()
1079
+ client = TestClient(app)
1080
+ client.get("/foobar")
1081
+ spans = self.memory_exporter.get_finished_spans()
1082
+ self.assertEqual(len(spans), 0)
1083
1084
def tearDown(self):
1085
self._instrumentor.uninstrument()
1086
super().tearDown()
0 commit comments