Skip to content

Commit 581099d

Browse files
committed
Update to follow changes; fill out configuration doc
1 parent ee6012f commit 581099d

File tree

2 files changed

+42
-4
lines changed

2 files changed

+42
-4
lines changed

Configuration.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
1-
TBD
1+
# Configuration
2+
3+
## Agent Communication
4+
5+
The sensor tries to communicate with the Instana agent via IP 127.0.0.1 and as a fallback via the host's default gateway for containerized environments. Should the agent not be available under either of these IPs, e.g. due to iptables or other networking tricks, you can use environment variables to configure where the Instana host agent lives.
6+
7+
To use these, these environment variables should be set in the environment of the running Python process.
8+
9+
```shell
10+
export INSTANA_AGENT_IP = '127.0.0.1'
11+
export INSTANA_AGENT_PORT = '42699'
12+
```
13+
14+
## Debugging & More Verbosity
15+
16+
Setting `INSTANA_GEM_DEV` to a non nil value will enable extra logging output generally useful
17+
for development.
18+
19+
```Python
20+
export INSTANA_DEV="true"
21+
```

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ _Note: When the Django or Flask instrumentation is used, runtime monitoring is a
4242
To enable runtime monitoring (without request tracing), set the following environment variable in your _application boot environment_ and then restart your application:
4343

4444
`export AUTOWRAPT_BOOTSTRAP=runtime`
45-
45+
4646
## uWSGI
4747

4848
### Threads
@@ -57,9 +57,27 @@ If you use uWSGI in forking workers mode, you must specify `--lazy-apps` (or `la
5757

5858
The instana package will automatically collect key metrics from your Python processes. Just install and go.
5959

60-
## Tracing
60+
## OpenTracing
61+
62+
This Python package supports [OpenTracing](http://opentracing.io/). When using this package, the OpenTracing tracer (`opentracing.tracer`) is automatically set to the `InstanaTracer`.
63+
64+
```Python
65+
import opentracing
66+
67+
parent_span = opentracing.tracer.start_span(operation_name="asteroid")
68+
# ... work
69+
child_span = ot.tracer.start_span(operation_name="spacedust", child_of=parent_span)
70+
child_span.set_tag(ext.SPAN_KIND, ext.SPAN_KIND_RPC_CLIENT)
71+
# ... work
72+
child_span.finish()
73+
# ... work
74+
parent_span.finish()
75+
```
76+
77+
## Configuration
78+
79+
See [Configuration.md](https://github.com/instana/python-sensor/blob/master/Configuration.md)
6180

62-
This Python package supports [OpenTracing](http://opentracing.io/).
6381

6482
## Documentation
6583

0 commit comments

Comments
 (0)