Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smlobo/opentelemetry-go-example
An example app where two Golang services collaborate on a user http request. OpenTelemetry is used to time & relate these 2 services.
https://github.com/smlobo/opentelemetry-go-example
distributed-tracing golang opentelemetry
Last synced: 1 day ago
JSON representation
An example app where two Golang services collaborate on a user http request. OpenTelemetry is used to time & relate these 2 services.
- Host: GitHub
- URL: https://github.com/smlobo/opentelemetry-go-example
- Owner: smlobo
- License: apache-2.0
- Created: 2022-02-12T18:30:01.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-26T05:10:56.000Z (over 1 year ago)
- Last Synced: 2024-06-19T22:14:46.800Z (8 months ago)
- Topics: distributed-tracing, golang, opentelemetry
- Language: Go
- Homepage:
- Size: 462 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# opentelemetry-go-example
An example app where two Golang services collaborate on an http request. The timing of these requests are recorded using the OpenTelemetry SDK.## Setup
* `make module build`## Jaeger Exporter - view traces on the Jaeger UI
* `docker run -d -p 16686:16686 -p 14268:14268 jaegertracing/all-in-one`
* Execute the `frontend` and `backend` services on separate terminals.
For example:
* `./bin/opentelemetry-go-example backend`
* `./bin/opentelemetry-go-example frontend`
* Generate traces:
* `curl http://localhost:8081`
* ![Example Jaeger Trace](images/jaeger-screenshot.png?raw=true "Example Jaeger Trace")## Zipkin Exporter - view traces on the Zipkin UI
* `docker run -d -p 9411:9411 openzipkin/zipkin`
* Execute the `frontend` and `backend` services on separate terminals.
For example:
* `EXPORTER=zipkin ./bin/opentelemetry-go-example backend`
* `EXPORTER=zipkin ./bin/opentelemetry-go-example frontend`
* Generate traces:
* `curl http://localhost:8081`
* ![Example Zipkin Trace](images/zipkin-screenshot.png?raw=true "Example Zipkin Trace")# References
* https://github.com/smlobo/zipkin-go-example
* https://pkg.go.dev/go.opentelemetry.io