Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit d154237

Browse files
authored
Update the hello world example (#102)
1 parent 33a0b37 commit d154237

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

examples/trace/helloworld/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from opencensus.trace import execution_context
1818
from opencensus.trace.exporters import print_exporter
19-
from opencensus.trace.tracers import Tracer
19+
from opencensus.trace.tracer import Tracer
2020
from opencensus.trace.samplers import always_on
2121

2222

@@ -30,8 +30,8 @@ def main():
3030
tracer = Tracer(sampler=sampler, exporter=exporter)
3131

3232
with tracer.span(name='root') as root_span:
33-
tracer.add_label_to_current_span(label_key='example key',
34-
label_value='example value')
33+
tracer.add_attribute_to_current_span(attribute_key='example key',
34+
attribute_value='example value')
3535
function_to_trace()
3636
with tracer.span(name='child') as child_span:
3737
function_to_trace()

0 commit comments

Comments
 (0)