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
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
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
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.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance










