trisolaran

trisolaran

I have a cluster with a number of phoenix applications. I would like to have a centralized repository where my applications can send telemetry events to and where the telemetry data can be persisted. Also, I’d like to have a tool with which I can easily plot and inspect metrics derived from this data (e.g. number of requests per seconds, duration of each request, the typical stuff)

In some of my past (non-Elixir) projects applications were sending measurements to a Prometheus server and the metrics were visualized using Grafana.

My question is: what are the standard tools for achieving the same result in Elixirland quickly and writing as little custom code as possible?

Showing Posts 1 to 10

stefanchrobot

stefanchrobot

The whole idea of telemetry is that you can plug in any data sink. Have a look at something like telemetry_metrics_prometheus. Never used it, but seems you should be able to pick it up pretty fast.

wolf4earth

wolf4earth

I haven’t used any of this in action but it might be worth to look into the ecosystem around OpenTelemetry which includes collectors which can publish to a variety of backends, among them Prometheus and others.

I know that this isn’t exactly what you were looking for but I felt it could be helpful to point it out, if not to you then maybe to others.

tejpochiraju

tejpochiraju

I think PromEx is a good choice.

trisolaran

trisolaran OP

Thanks a lot @stefanchrobot, @wolf4earth and @tejpochiraju for your answers! They’ve all been useful to me :slight_smile:

Apparently, there is no “Elixir replacement” for Prometheus, which is what I initially suspected. And it makes sense, no point in reeinventing the wheel.

telemetry_metrics_prmetheus looks like a super quick way to expose a /metrics endpoint for Prometheus to scrape, PromEx does pretty much the same thing AFAICS but it adds a custom Grafana dashboard that you can import. Sweet. Thanks for the pointers, now I know what I need to do :+1:

tangui

tangui

Another option, especially if you have many Phoenix apps or if you dynamically launch them, is to write to a central metrics repository such as statsd_exporter and then have prometheus scrape it. I remember using statix on Phoenix side to send metrics.

Basically you have this:

+-------------------+        +---------------------+                        +--------------+
|  Phoenix + statix |------->|   statsd_exporter   |<---(scrape /metrics)---|  Prometheus  |
+-------------------+        +---------------------+                        +--------------+

with as many Phoenix instances as you need.

stefanchrobot

stefanchrobot

What’s the difference between Telemetry and OpenTelemetry? Should the Erlang ecosystem adopt OpenTelemetry instead?

wolf4earth

wolf4earth

My understanding was the Erlang OpenTelemetry bindings can be used to export Telemetry events but maybe I’m wrong. :thinking:

LostKobrakai

LostKobrakai

Integration and adoption is already happening:
https://opentelemetry.io/docs/erlang/

But also telemetry can be a low level detail to fetching the data needed for open telemetry as far as I understand it. They’re not competing.

trisolaran

trisolaran OP

Interesting. I believe this would be overkill for my current setup, but it’s something to keep in mind.

tristan

tristan

Rebar3 Core Team

Note that OpenTelemetry Metrics is still very early, so if you are mainly looking at exporting metrics like with prometheus you will want to use something else unless you are ok with lots of breakage and having to dig in to the code :slight_smile:

And yes, telemetry the library has a much more narrow purpose, it can be integrated with OpenTelemetry through handlers.

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews