https://github.com/rnburn/ot-chat
Example of OpenTracing's plugin approach
https://github.com/rnburn/ot-chat
boost-beast cpp jaeger opentracing zipkin
Last synced: 2 months ago
JSON representation
Example of OpenTracing's plugin approach
- Host: GitHub
- URL: https://github.com/rnburn/ot-chat
- Owner: rnburn
- Created: 2018-04-19T20:00:40.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-21T20:47:31.000Z (almost 7 years ago)
- Last Synced: 2025-01-20T02:49:22.945Z (4 months ago)
- Topics: boost-beast, cpp, jaeger, opentracing, zipkin
- Language: C++
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ot-chat-example
`ot-chat` reconstructs [sockets.io](https://socket.io/get-started/chat/)'s chat example
using [Boost.Beast](https://github.com/boostorg/beast) and instruments it for
distributed tracing.Examples have been set up with `docker-compose` for LightStep, Jaeger, and
Zipkin. To run, follow these instructions:```sh
# LightStep
cd lightstep
export LIGHTSTEP_ACCESS_TOKEN=
docker-compose up# Jaeger
cd jaeger
docker-compose up# Zipkin
cd zipkin
docker-compose up
```Then visit [`http://localhost:8080`](http://localhost:8080).
`ot-chat` demonstrates
1. Pluggable tracing using OpenTracing's dynamic loading API. See `load_tracer` in [configuration.cpp](https://github.com/rnburn/ot-chat/blob/master/src/configuration.cpp#L41).
2. Embedding of the tracer's JSON configuration with the application's configuration. See [configuration.proto](https://github.com/rnburn/ot-chat/blob/master/configuration.proto#L21).
3. Context propagation with JavaScript using a JSON text map encoding. See [message.cpp](https://github.com/rnburn/ot-chat/blob/master/src/message.cpp) and [index.html.in](https://github.com/rnburn/ot-chat/blob/master/lightstep/init/index.html.in).