Write an example on how to use OpenTelemetry with:
- HTTP Client
- gRPC Server
- Postgres Client
- Redis Client
This example consists of a Cat API, where cats are registered along with cat facts.
Start Jaeger, Postgres and Redis:
make deps
make migrations
Run the application:
make run
Call the API:
Create a cat:
grpcurl \
-d '{ "cat": { "name": "Tom", "id": "tom" } }' \
-plaintext localhost:8080 \
api.v1.CatService/CreateCat
Create another cat (if within 10s, the same cat fact will be used from cache):
grpcurl \
-d '{ "cat": { "name": "Garfield", "id": "garfield" } }' \
-plaintext localhost:8080 \
api.v1.CatService/CreateCat
List cats:
grpcurl \
-plaintext localhost:8080 \
api.v1.CatService/ListCats
Find the traces in Jaeger UI: