Example #1
0
 def test_force_sampling(self):
     span_with_debug_flag = Span('test-id', 'test-parent', 'test-span-id',
                                 True, 1, "test")
     span_without_debug_flag = Span('test-id', 'test-parent',
                                    'test-span-id', True, 0, "test")
     self.assertTrue(
         TraceBaseplateObserver.force_sampling(span_with_debug_flag))
     self.assertFalse(
         TraceBaseplateObserver.force_sampling(span_without_debug_flag))
 def test_force_sampling(self):
     span_with_debug_flag = Span("test-id", "test-parent", "test-span-id",
                                 True, 1, "test", self.mock_context)
     span_without_debug_flag = Span("test-id", "test-parent",
                                    "test-span-id", True, 0, "test",
                                    self.mock_context)
     self.assertTrue(
         TraceBaseplateObserver.force_sampling(span_with_debug_flag))
     self.assertFalse(
         TraceBaseplateObserver.force_sampling(span_without_debug_flag))
Example #3
0
 def test_force_sampling(self):
     span_with_debug_flag = Span('test-id',
                                 'test-parent',
                                 'test-span-id',
                                 True,
                                 1,
                                 "test",
                                 self.mock_context)
     span_without_debug_flag = Span('test-id',
                                    'test-parent',
                                    'test-span-id',
                                    True,
                                    0,
                                    "test",
                                    self.mock_context)
     self.assertTrue(
         TraceBaseplateObserver.force_sampling(span_with_debug_flag)
     )
     self.assertFalse(
         TraceBaseplateObserver.force_sampling(span_without_debug_flag)
     )
Example #4
0
 def test_force_sampling(self):
     span_with_debug_flag = Span("test-id", "test-parent", "test-span-id", True, 1, "test")
     span_without_debug_flag = Span("test-id", "test-parent", "test-span-id", True, 0, "test")
     self.assertTrue(TraceBaseplateObserver.force_sampling(span_with_debug_flag))
     self.assertFalse(TraceBaseplateObserver.force_sampling(span_without_debug_flag))