Skip to content

Commit 1f58411

Browse files
committed
Fix code examples
1 parent 48f460a commit 1f58411

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/manual-instrumentation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def hello():
125125
# create a span for the choice of the name, this may be a costly call in your real world application
126126
with tracer.start_as_current_span("choice") as span:
127127
choice = random.choice(choices)
128-
span.set_attribute("choice.value", choice)
128+
span.set_attribute("choice.value", choice)
129129
return f"Hello {choice}!"
130130
```
131131
@@ -142,7 +142,7 @@ are tracking how many times we are getting one of the possible choices for our s
142142
import random
143143
144144
from flask import Flask
145-
from opentelemetry import trace
145+
from opentelemetry import metrics, trace
146146
147147
tracer = trace.get_tracer(__name__)
148148
meter = metrics.get_meter(__name__)
@@ -160,7 +160,7 @@ def hello():
160160
# create a span for the choice of the name, this may be a costly call in your real world application
161161
with tracer.start_as_current_span("choice") as span:
162162
choice = random.choice(choices)
163-
span.set_attribute("choice.value", choice)
163+
span.set_attribute("choice.value", choice)
164164
hello_counter.add(1, {"choice.value": choice})
165165
return f"Hello {choice}!"
166166
```

0 commit comments

Comments
 (0)