Prompt
I'm building a microservices app and need distributed tracing
Latest observation
Oct 28, 2026
OpenAI APIWeb search: off
Great fit for OpenTelemetry.
For a microservices app, the usual approach is:
-
Instrument each service with OpenTelemetry
- Capture incoming HTTP/gRPC requests
- Propagate trace context between services
- Record spans for internal operations, DB calls, queue operations, etc.
-
Use a trace backend / collector
- Run an OpenTelemetry Collector in your cluster or infrastructure
- Export traces from the collector to a backend like:
- Jaeger
- Grafana Tempo
- Honeycomb
- Datadog
- New Relic
- Elastic
- AWS X-Ray
-
Make context propagation consistent
- Use the standard W3C Trace Context headers:
traceparenttracestate
- If you use messaging, propagate context through message headers too.
- Use the standard W3C Trace Context headers:
-
Add service and resource metadata
- Service name
- Environment
- Version
- Region / cluster / pod info
-
Sample traces
- Start with head-based sampling for cost control
- Use tail-based sampling if you want to keep error/slow traces more intelligently
A common architecture is:
- App services → OpenTelemetry SDK/auto-instrumentation → OpenTelemetry Collector → Trace backend
If you want, I can help with any of these next:
- recommended tracing setup for your stack
- sample code in a specific language
- Docker/Kubernetes deployment
- OpenTelemetry Collector config
- choosing a backend like Jaeger vs Tempo vs Datadog