Observability across a polyglot Go and Node.js stack
Observability across a polyglot Go and Node.js stack
When half your services are in Go and the other half in Node.js, observability is the thing that makes the system feel like one product instead of two projects.
Metrics with a shared vocabulary
Use the same metric names and labels in both runtimes: request duration, request count, error count and queue depth. The library differs; the semantics must not.
histogram.WithLabelValues(route).Observe(elapsed.Seconds())
requestDuration.labels(route).observe(elapsedSeconds)
Tracing across the boundary
Propagate W3C trace context on every hop. A request from a Node.js API into a Go worker should produce one trace, not two unrelated spans.
- OpenTelemetry SDKs in both runtimes
- OTLP collector as the single destination
- Tempo for traces, Grafana for exploration
Logs that earn their keep
Log events, not prose. Include the trace ID, the entity ID and a stable event name. Structured logs in Loki become useful when the fields are consistent across languages.
What to alert on
Alert on user-visible symptoms: error rate, latency and queue lag. CPU and memory are debugging signals, not pages. If an alert cannot be tied to a user outcome, delete it.
Key takeaways
Standardise names, propagate context and alert on symptoms. A polyglot stack is observable when the data model is shared, not when every service uses the same library.