Grahamdumpleton iconGrahamdumpletonSep 11, 2026 ~1 min source read

Graham Dumpleton: OpenTelemetry export in wrapture

Everything in the last four posts rendered a trace for a person to read or wrote it to a file for later. The other destination is a tracing backend, fed while the application runs, and OpenTelemetry is the one that the ecosystem has converged on.

Graham Dumpleton: OpenTelemetry export in wrapture

Share this story

Send the public story page.

Useful takeaways from this story.

Everything in the last four posts rendered a trace for a person to read or wrote it to a file for later.

I shortened the metrics export interval so the demonstration would not have to wait a minute for a data point.

For a look without a collector, the console exporters print the spans and metrics to standard output instead, which is what I used here: $ OTEL_TRACES_EXPORTER=console OTEL_METRICS_EXPORTER=console \ python...

Building the complete brief

The page is ready to read now. The fuller skim-friendly version will appear here automatically.

The useful part

Everything in the last four posts rendered a trace for a person to read or wrote it to a file for later. The other destination is a tracing backend, fed while the application runs, and OpenTelemetry is the one that the ecosystem has converged on. $ pip install "wrapture[otel]" A plain install pays nothing for this, since nothing in base wrapture imports the subpackage until a config asks for it.

How it works

  • The presence of the table opts in, a service name identifies the process, and each signal's tuning nests beneath it.
  • I shortened the metrics export interval so the demonstration would not have to wait a minute for a data point.
  • One table Export is switched on by a top-level [otel] table in the same config file the Flask shop has been using.

Example or evidence

  • For a look without a collector, the console exporters print the spans and metrics to standard output instead, which is what I used here: $ OTEL_TRACES_EXPORTER=console OTEL_METRICS_EXPORTER=console \ python...

Keep reading in the app

Open the app view to save this story, compare related coverage, and continue from the same source.

Open in app