示例#1
0
 def test_list_no_match(self):
     span = Span(name='Name', tracer=None)
     span.set_tag(URL, r'http://cooldomain.example.com')
     filtr = FilterRequestsOnUrl([
         'http://domain\.example\.com', 'http://anotherdomain\.example\.com'
     ])
     trace = filtr.process_trace([span])
     self.assertIsNotNone(trace)
示例#2
0
 def test_list_match(self):
     span = Span(name="Name", tracer=None)
     span.set_tag(URL, r"http://anotherdomain.example.com")
     filtr = FilterRequestsOnUrl([
         r"http://domain\.example\.com",
         r"http://anotherdomain\.example\.com"
     ])
     trace = filtr.process_trace([span])
     self.assertIsNone(trace)
示例#3
0
 def test_is_match(self):
     span = Span(name='Name', tracer=None)
     span.set_tag(URL, r'http://example.com')
     filtr = FilterRequestsOnUrl('http://examp.*.com')
     trace = filtr.process_trace([span])
     self.assertIsNone(trace)
示例#4
0
 def test_is_not_match(self):
     span = Span(name="Name", tracer=None)
     span.set_tag(URL, r"http://anotherexample.com")
     filtr = FilterRequestsOnUrl("http://examp.*.com")
     trace = filtr.process_trace([span])
     self.assertIsNotNone(trace)