Skip to content

Commit

Permalink
Add info on configuring Jaeger agent location.
Browse files Browse the repository at this point in the history
This is in response to [this issue](jaegertracing#47).

Signed-off-by: Carlos Nunez <carlosonunez@noreply.github.com>
  • Loading branch information
carlosonunez authored and Carlos Nunez committed Mar 27, 2019
1 parent a1c7e9d commit ff7513e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,26 @@ if __name__ == "__main__":
tracer.close() # flush any buffered spans
```

**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.)

```python
config = Config(
config={ # usually read from some yaml config
'sampler': {
'type': 'const',
'param': 1,
},
'local_agent': {
'reporting_host': 'your-reporting-host',
'reporting_port': 'your-reporting-port',
},
'logging': True,
},
service_name='your-app-name',
validate=True,
)
```

### Other Instrumentation

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.
Expand Down

0 comments on commit ff7513e

Please sign in to comment.