tcoopman

tcoopman

How are you using (open)telemetry in your Elixir applications

Yesterday I watched OpenTelemetry: From Desire to Dashboard and it triggered me to take a new look at telemetry in Elixir.

But I don’t know where to start, so I wanted to ask you what your experiences are with telemetry and/or open telemetry. How you use it, how your setup looks like,…

I currently have some applications deployed on fly.io and I was wondering what a good way to start would be. A start could be something that adds some value but doesn’t involve too much work.

So I’d love to hear how you’re using it, what value does it bring for you,…

Most Liked

dimitarvp

dimitarvp

Excellent question. I think that a proper knowledge base on OTel in Elixir is long overdue for whoever might have the time to author it.

mudasobwa

mudasobwa

Creator of Cure

Just to make it easier to get into using any telemetry backend, one might take a look at telemetria library which is backend-agnostic and allows telemetry adoption via @telemetria module attributes, like

defmodule Forecast do
  use Telemetria

  @telemetria level: :info, group: :weather_reports, locals: [:farenheit]
  def weather(city) do
    fahrenheit = ExternalService.retrieve(city)
    Converter.fahrenheit_to_celcius(fahrenheit)
  end
end
smaller_infinity

smaller_infinity

I just set up a telemetry stack for a Phoenix Application. Its on my homelab, so I’m not sure how it’ll work on fly.io, but hopefully it’ll give you a place to start. For traces you will need, at minimum, opentelemetry, opentelemetry_api, and opentelemetry_exporter. On top of that there are packages like opentelemetry_phoenix, which will trace important libraries for you out of the box. For metrics Elixir’s OTEL SDK isn’t ready yet, but you can use prom_ex, which is really good. And you can use an OTEL collector to handle both those metrics and those traces, and then forward them to whatever tool you are using. For logs you’ll just have to use whatever tool to collect them your stack offers (like promtail for grafana loki). Hopefully that’s enough to start, but if you have any questions just ask.

Where Next?

Popular in Discussions Top

cjbottaro
I’ve been primarily doing Elixir development for the past 6 years or so, and during that time whole heartedly committed to functional par...
New
adamu
When starting a new project, do you have any go-to libraries you pull in out of habit/preference? For example, Ash, Credo, Mox, ExMachin...
New
stefannovak
Hi all, I’m going to be giving a little 20 minute tech talk at my company which uses .NET C# across all of our 100ish size IT team. I’m ...
New
smueller
With the announcement of 1.19 rc0 and the path to user-supplied type annotations, I want to make the case for inline types—both for funct...
New
tristan
First announced on the Erlang Forum, BEAMup is a tool for installing a managing the active instance of BEAM languages. It has support for...
New
Morzaram
Hey everyone. I’m feeling a bit conflicted. I’ve learned Flutter and built a somewhat MVP of this app. I’m a solo dev and throughout this...
New
wanton7
Our company has used virtual actor framework called Orleans that is for C#/.Net Framework. There are clones of it in Erlang GitHub - erle...
New
travisf
In upgrading from Ecto 2 to Ecto 3 I’m dealing with a failing test. If I use ExMachina build(:address) I’ll get an error trying to put_e...
New
AstonJ
Posting this as a separate thread as I’m sure lots of people will be curious - what will the (or the intended) differences be and when mi...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement