Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 75728f5

Browse files
authored
Fixed manual tracing example in docs
Updated docs to fix incorrect manual tracing example.
1 parent 5488cc4 commit 75728f5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,14 @@ Step 6: Add tracing to the Lambda function
179179
.. code:: python
180180
181181
import opentracing
182-
183-
tracer = opentracing.tracer
184-
182+
183+
@signalfx_lambda.is_traced()
185184
def some_function():
185+
# opentracing.tracer must be referenced from within
186+
# a function decorated with the is_traced() decorator
187+
# or it'll not reference the correct tracer initialized
188+
# for the lambda function.
189+
tracer = opentracing.tracer
186190
with tracer.start_active_span("span_name", tags=tags) as scope:
187191
188192
# do some work

0 commit comments

Comments
 (0)