DEV Community

Cover image for OpenTelemetry traces for everything with tracepusher
Adam Gardner
Adam Gardner

Posted on

1

OpenTelemetry traces for everything with tracepusher

OpenTelemetry is everywhere. If you don't already know, it is an open standard (and large ecosystem) which allows for logs, metrics and distributed traces.

If you don't know what a distributed trace is, think of it like a Gantt chart or timeline of your work, across (as the name suggests) multiple tiers or "steps".

A complex multi-span OpenTelemetry trace generated by tracepusher

Luckily most applications and vendors are now starting to instrument their code to automatically emit OpenTelemetry metrics - so things like nginx, apache and databases will (if not yet) soon "just work" and you'll "just get" traces.

What about the older stuff?

Although we aim for entirely modern practices, let's be honest. There's still the odd (Power)shell script, Cron Job and Jenkins pipeline lying around...

How do we get observability of those?

Answer: tracepusher

tracepusher (on GitHub) is an open source utility which generates OpenTelemetry spans on demand, so you call it and it will generate and send the data to a backend for visualisation.



tracepusher \
  --endpoint=http://YourOpenTelemetryCollector:4318 \
  --service-name=serviceA \
  --span-name="main_span" \
  --duration=2500 \
  --duration-type=ms


Enter fullscreen mode Exit fullscreen mode

Now you can trace literally anything you want:

  • Shell scripts
  • Powershell scripts
  • CICD pipelines (Jenkins, Gitlab, GitHub Actions)
  • Kubernetes Jobs
  • Converting mainframe logs

tracepusher supports span events, span attributes, complex (multi-span) support and more.

tracepusher is available on GitHub (and the docs are here)

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay