Beispiel #1
0
 def test_set_custom_propagator(self):
     reload(propagate)
     _configure_tracing(_Options())
     propagator = get_global_textmap()
     self.assertIsInstance(propagator, CompositePropagator)
     propagators = propagator._propagators  # pylint: disable=protected-access
     self.assertEqual(len(propagators), 1)
     self.assertIsInstance(propagators[0], W3CBaggagePropagator)
Beispiel #2
0
 def test_sets_tracecontext_and_baggage_are_default_propagator(self):
     reload(propagate)
     _configure_tracing(_Options())
     propagator = get_global_textmap()
     self.assertIsInstance(propagator, CompositePropagator)
     propagators = propagator._propagators  # pylint: disable=protected-access
     self.assertEqual(len(propagators), 2)
     self.assertIsInstance(propagators[0], TraceContextTextMapPropagator)
     self.assertIsInstance(propagators[1], W3CBaggagePropagator)
Beispiel #3
0
 def _configure(self, **kwargs: Dict[str, Any]) -> None:
     if self._tracing_enabled:
         _configure_tracing(_Options())
Beispiel #4
0
 def test_server_timing_is_global_response_propagator_disabled_env(self):
     _configure_tracing(_Options())
     self.assertIsNone(get_global_response_propagator())
Beispiel #5
0
 def test_server_timing_is_global_response_propagator_disabled_code(self):
     _configure_tracing(_Options(trace_response_header_enabled=False))
     self.assertIsNone(get_global_response_propagator())
Beispiel #6
0
 def test_server_timing_is_default_response_propagator(self):
     _configure_tracing(_Options())
     propagtor = get_global_response_propagator()
     self.assertIsInstance(propagtor, _ServerTimingResponsePropagator)
 def test_sets_b3_is_global_propagator(self):
     _configure_tracing(Options())
     propagtor = get_global_textmap()
     self.assertIsInstance(propagtor, B3Format)
Beispiel #8
0
 def _configure(self, **kwargs: Dict[str, Any]) -> None:
     _configure_tracing(Options())