Hey there! Welcome to my otel-playground
. This is basically where I'm messing around with OpenTelemetry (OTel) to figure out how it all works. I'm trying to see how I can use it to get a better look at what's happening inside a modern web app.
The app itself was quickly put together using the T3 Stack, which is a cool way to build web apps with TypeScript and other neat tools.
Mostly, I'm just using this space to learn and keep track of my experiments with OpenTelemetry. This means I'm trying to:
- Get tracing, metrics, and logs set up.
- Play around with an OTel collector.
- See how the data looks in tools like Grafana, Jaeger/Tempo, Prometheus, and Loki.
- Figure out how to add OTel to different bits of the T3 stack.
Here's a quick rundown of the main stuff in this project:
- The App Itself: Next.js (v15+), TypeScript, Tailwind CSS, tRPC, Drizzle ORM with PostgreSQL, Zod, and
@t3-oss/env-nextjs
for environment stuff.
- OTel Goodies:
@opentelemetry/api
@opentelemetry/sdk-node
@opentelemetry/auto-instrumentations-node
@opentelemetry/instrumentation
@opentelemetry/exporter-trace-otlp-proto
@opentelemetry/exporter-metrics-otlp-proto
@opentelemetry/sdk-logs
&@opentelemetry/api-logs
- Collector: The config for this is in
otel-collector-config.yaml
. - Viewing the Data (all running in Docker via
compose.dev.yml
):- Prometheus (config in
prometheus.yml
) - Grafana (config in
grafana-provisioning
) - Tempo (config in
tempo-config.yaml
) - Loki (for logs)
- And probably Jaeger or something similar for traces.
- Prometheus (config in
- Running it all: Docker (
compose.dev.yml
) - Keeping code clean: ESLint, Prettier
- Packages: npm
(Feel free to add more details here on how to actually run it!)
- Grab the code (clone the repo).
- Install the bits and bobs:
npm install
- Set up your environment variables (check out
.env.example
for a guide). - Get it running (probably involves Docker Compose and
npm run dev
).
This is really just a project for me to learn, so don't expect a polished, production-ready thing. It's all a bit of an experiment!