Skip to content

Commit 74c9054

Browse files
authored
Add section describing current_context retrieval
1 parent 5e6088f commit 74c9054

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ child_span.finish()
6666
parent_span.finish()
6767
```
6868

69+
Note: The Instana sensor has automatic instrumentation that activates at runtime. If you need to get the current tracing context from existing instrumentation, you can use `opentracing.tracer.current_context()` and pass that return value as `childof`:
70+
71+
context = opentracing.tracer.current_context()
72+
span = opentracing.tracer.start_span("my_span", child_of=context)
73+
74+
6975
## Configuration
7076

7177
See [Configuration.md](https://github.com/instana/python-sensor/blob/master/Configuration.md)

0 commit comments

Comments
 (0)