Skip to content
This repository was archived by the owner on Jul 11, 2022. It is now read-only.

Commit de9ad06

Browse files
carlosonunezyurishkuro
authored andcommitted
Add info on configuring Jaeger agent location. (#245)
This is in response to [this issue](#47). Signed-off-by: Carlos Nunez <[email protected]>
1 parent a1c7e9d commit de9ad06

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,26 @@ if __name__ == "__main__":
5353
tracer.close() # flush any buffered spans
5454
```
5555

56+
**NOTE**: If you're using the Jaeger `all-in-one` Docker image (or similar) and want to run Jaeger in a separate container from your app, use the code below to define the host and port that the Jaeger agent is running on. *Note that this is not recommended, as Jaeger sends spans over UDP and UDP does not guarantee delivery.* (See [this thread](https://github.com/jaegertracing/jaeger-client-python/issues/47) for more details.)
57+
58+
```python
59+
config = Config(
60+
config={ # usually read from some yaml config
61+
'sampler': {
62+
'type': 'const',
63+
'param': 1,
64+
},
65+
'local_agent': {
66+
'reporting_host': 'your-reporting-host',
67+
'reporting_port': 'your-reporting-port',
68+
},
69+
'logging': True,
70+
},
71+
service_name='your-app-name',
72+
validate=True,
73+
)
74+
```
75+
5676
### Other Instrumentation
5777

5878
The [opentracing-contrib](https://github.com/opentracing-contrib) project has a few modules that provide explicit instrumentation support for popular frameworks like Django and Flask.

0 commit comments

Comments
 (0)