This repository was archived by the owner on Sep 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed
contrib/opencensus-ext-jaeger/tests Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ def test_translate_to_jaeger(self):
311311 operationName = 'test1' ,
312312 startTime = 1502820146071158 ,
313313 duration = 10000000 ,
314- flags = 1 ,
314+ flags = 0 ,
315315 tags = [
316316 jaeger .Tag (
317317 key = 'key_bool' , vType = jaeger .TagType .BOOL ,
Original file line number Diff line number Diff line change 1919import six
2020import uuid
2121
22- from opencensus .trace import trace_options
22+ from opencensus .trace import trace_options as trace_options_module
2323
2424_INVALID_TRACE_ID = '0' * 32
2525INVALID_SPAN_ID = '0' * 16
2626
2727TRACE_ID_PATTERN = re .compile ('[0-9a-f]{32}?' )
2828SPAN_ID_PATTERN = re .compile ('[0-9a-f]{16}?' )
2929
30- # Default options, enable tracing
31- DEFAULT_OPTIONS = 1
32-
33- # Default trace options
34- DEFAULT = trace_options .TraceOptions (DEFAULT_OPTIONS )
30+ # Default options, don't force sampling
31+ DEFAULT_OPTIONS = '0'
3532
3633
3734class SpanContext (object ):
@@ -65,7 +62,7 @@ def __init__(
6562 trace_id = generate_trace_id ()
6663
6764 if trace_options is None :
68- trace_options = DEFAULT
65+ trace_options = trace_options_module . TraceOptions ( DEFAULT_OPTIONS )
6966
7067 self .from_header = from_header
7168 self .trace_id = self ._check_trace_id (trace_id )
Original file line number Diff line number Diff line change @@ -91,9 +91,8 @@ def test_should_sample_not_sampled(self):
9191
9292 self .assertFalse (sampled )
9393
94- def get_tracer_noop_tracer (self ):
94+ def test_get_tracer_noop_tracer (self ):
9595 from opencensus .trace .tracers import noop_tracer
96-
9796 sampler = mock .Mock ()
9897 sampler .should_sample .return_value = False
9998 tracer = tracer_module .Tracer (sampler = sampler )
@@ -102,7 +101,7 @@ def get_tracer_noop_tracer(self):
102101
103102 assert isinstance (result , noop_tracer .NoopTracer )
104103
105- def get_tracer_context_tracer (self ):
104+ def test_get_tracer_context_tracer (self ):
106105 from opencensus .trace .tracers import context_tracer
107106
108107 sampler = mock .Mock ()
You can’t perform that action at this time.
0 commit comments