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)

Billboard image

Use Playwright to test. Use Playwright to monitor.

Join Vercel, CrowdStrike, and thousands of other teams that run end-to-end monitors on Checkly's programmable monitoring platform.

Get started now!

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay