This sample illustrates Spin native integration with OpenTelemetry (OTel). Spin automatically instruments your applications. If the OTEL_EXPORTER_OTLP_ENDPOINT is present, the Spin runtime will automatically send distributed traces to the OTLP endpoint.
This sample uses Jaeger for visualizing distributed traces collected by Spin.
The Spin App exposes the following endpoints:
GET /-> Returns an HTTP 200 with a response bodyGET /slow-> Sleeps for 5 seconds before returning an HTTP 200GET /kv-> Interacts with a key-value store before returning an HTTP 200GET /400-> Returns an HTTP 400GET /404-> Returns an HTTP 404GET /500-> Returns an HTTP 500
- Local (
spin up) - SpinKube
- Fermyon Platform for Kubernetes
To use this sample you must have
- Rust installed on your machine
- The
wasm32-wasitarget for Rust installed (rustup target add wasm32-wasi)
- The
- Spin CLI installed on your machine
- Docker or an alternative container runtime is required to run Jaeger locally
To run the sample locally, you can use the run target defined by the Makefile.
The run target does the following:
- If a
jaegercontainer is running on your machine, it will be stopped and deleted - Jaeger All-In-One will be started locally
- Necessary
OTEL_EXPORTER_OTLP_ENDPOINTenvironment variable will be set - The Spin App will be started using
spin up --build