Skip to content
Ignacio Perales

Observability with OpenTelemetry

I instrument services with OpenTelemetry and put trace IDs in the logs, so every log line leads back to its trace.

At Eniax, services send traces and logs to SigNoz through OpenTelemetry, and Grafana is also part of the setup. On a private community video platform I co-own, I set up OpenTelemetry into SigNoz with trace IDs injected into the logs.

Where I've used it

Eniax

Health-tech company, Chile

Employer2022-06 → now

A set of microservices that talk over RabbitMQ, where a single request can touch several services.

Built

  • OpenTelemetry instrumentation that sends traces and logs to SigNoz.
  • Grafana as part of the monitoring setup.
  • OpenTelemetry
  • SigNoz
  • Grafana

Private community video platform

Anonymized · no name or link

Own

A NestJS backend that I run and debug on my own.

Built

  • OpenTelemetry tracing into SigNoz, with trace IDs injected into the logs so each log line points to its trace.
  • OpenTelemetry
  • SigNoz
  • NestJS

Architecture

Services are instrumented with OpenTelemetry and export traces and logs to SigNoz. At Eniax the system is a set of microservices that talk over RabbitMQ, so a single request can touch several services. Grafana is also part of the monitoring setup there.

On the video platform, the NestJS backend exports traces to SigNoz, and every log line carries the ID of the trace it belongs to.

Eniax

    • Microservicestalk over RabbitMQ
    • OpenTelemetrytraces and logs
    • SigNoz

Video platform

    • NestJS backend
    • OpenTelemetrytrace ID in every log line
    • SigNoz
  • Service
  • Several instances
  • Storage

Services instrumented with OpenTelemetry export traces and logs to SigNoz. On the video platform, the NestJS backend exports traces to SigNoz, and every log line carries the ID of the trace it belongs to.

Demo

Interactive diagram

Trace waterfall

An interactive waterfall built from a sanitized trace. Expand the spans, compare their timings and see the log lines that belong to each one.

Coming soonThis demo isn't built yet. The title and description above say what it will show.

Decisions & lessons

  1. Correlate logs with traces. Injecting the trace ID into each log line turns "find the logs for this slow request" into a single lookup.
  2. Use one standard. OpenTelemetry keeps the instrumentation independent of the backend that stores and shows the data.

Stack

  • OpenTelemetry
  • SigNoz
  • Grafana
  • NestJS