How do I send tracing (OpenTelemetry/OpenTracing?) info to Grafana Tempo from a Phoenix api in 2022?

I’m having a hard time figuring out where to start. I’d like to configure our Phoenix apis to send trace info to Grafana Tempo, so that I can debug issues where multiple APIs/services are calling one another.

But I don’t know where to start investigating, too many questions…

  • Should I research OpenTracing, or OpenTelementry, or something else? There seems to have been a lot of movement in the “monitoring” space the last couple of years.
  • Should I hook into Elixir’s “Telemetry” modules?
  • Is there an Elixir module somewhere that would make sending OpenTrace messages to Grafana Tempo? Or even better, is there an Elixir Grafana library somewhere? (I couldn’t find one).

I don’t need detailed solutions, just some idea of what to start researching.

Thanks in advance!

3 Likes

I’m using PromEx to expose metrics from my application to Prometheus/Grafana. Very happy with it.

2 Likes

Thanks @trisolaran. Do you expose traces as well?

If I remember correctly, Prometheus is used to monitor things in Kubernetes, or am I mistaken?

Our code runs on Fargate/ECS, so not sure if PromEx will fit into our system.

No

Prometheus can be used to monitor any application that exposes an endpoint with prometheus metrics. It doesn’t matter how it’s deployed.

This one might be helpful:

4 Likes

~12 mo ago, I was playing with this awesome combo and published my experiments here: GitHub - florinpatrascu/elixir_grafana_loki_tempo: A very simple Elixir demo/project used for experimenting with Grafana Tempo and Loki #opentelemetry #observability #tracing, maybe you can find something useful in it?! hth

5 Likes

That’s fantastic, thanks so much for posting it.

2 Likes

Great, thanks everyone, this gives me something to work with :slight_smile: