Two ASP.NET services instrumented with OpenTelemetry, shipping traces, logs, and metrics to ClickStack.
Companion demo to the Structured Logging with Serilog and ClickHouse blog post. That demo showed "bring your own schema, write directly to ClickHouse via Serilog"; this one shows "use the standard OTel pipeline and let ClickStack light up automatically."
┌─────────────┐ HTTP ┌──────────────────┐
│ Order API │──────────────▶│ Payment Service │
│ :5000 │ │ :5001 │
└──────┬──────┘ └────────┬─────────┘
│ OTLP/gRPC │ OTLP/gRPC
│ │
▼ ▼
┌──────────────────────────────────────────────────┐
│ ClickStack :8080 │
│ (OTel Collector → ClickHouse → UI) │
└──────────────────────────────────────────────────┘
Both services export traces, logs, and metrics via OTLP/gRPC to ClickStack's built-in OpenTelemetry collector.
docker compose up -dWait for all services to start (~30s), then:
- ClickStack UI: http://localhost:8080
- Order API: http://localhost:5000
- Payment Service: http://localhost:5001
- ClickHouse Play: http://localhost:18123
The seed-data container automatically generates traffic on startup.
| Method | Path | Description |
|---|---|---|
| POST | /orders |
Place a new order |
| GET | /orders/{id} |
Get order by ID |
| GET | /products |
List all products |
| GET | /products/{id} |
Get product by ID |
| GET | /health |
Health check |
| POST | /generate-traffic |
Generate sample traffic |
| Method | Path | Description |
|---|---|---|
| POST | /payments |
Process a payment |
| GET | /payments/{id} |
Get payment by ID |
| GET | /health |
Health check |
curl -X POST http://localhost:5000/orders \
-H 'Content-Type: application/json' \
-d '{"userId":"test","productId":1,"quantity":1,"paymentMethod":"credit_card"}'curl -X POST http://localhost:5000/orders \
-H 'Content-Type: application/json' \
-d '{"userId":"test","productId":4,"quantity":1,"paymentMethod":"credit_card"}'curl -X POST http://localhost:5000/generate-traffic- Service Map — see
order-api → payment-servicedependency - Distributed Traces — click a trace to see spans across both services
- Error Traces — filter for error traces to see timeouts and failures
- Log-to-Trace — click a log entry to jump to its parent trace
- Metrics — view
orders.placed,payments.processed, and HTTP metrics