venkatd

venkatd

I am researching instrumentation and I see there’s the :telemetry library but there is also :opentelemetry and additional integrations such as :opentelemetry_ecto.

What is the relationship between the two? Is opentelemetry meant to replace telemetry or do they serve different purposes?

It also seems like they both have mechanisms for tracking events. There is Tracer.with_span in opentelemetry and there is :telemetry.execute in telemetry.

If you’re using one or the other or both, would love to hear about your setup!

Showing Posts 1 to 8

hubertlepicki

hubertlepicki

There is no direct relationship between these two libraries.

:telemetry allows you to add hooks and collect metrics from internals of your own code and libraries and then do stuff with it using collectors.

OpenTelemtry is a distributed tracing standard for applications.

OpenTelemtry can use bits and pieces and hook into libraries and code using :telemetry but they operate on entirely different layer.

mudasobwa

mudasobwa

Creator of Cure

You might want to look at telemetria library I wrote to simplify enabling and globally configuring telemetry in your app. It is backend-agnostic and might be used with both :telemetry and :opentelemetry backends.

venkatd

venkatd OP

To clarify I’m referring to :opentelemetry the elixir/erlang implementation of the tracing standard.

I was wondering if :opentelemetry makes :telemetry unnecessary or if they are complementary.

venkatd

venkatd OP

Very cool. Will check it out!

hubertlepicki

hubertlepicki

Yes, they’re complementary. One is Elixir/Erlang specific, the other one not.

cevado

cevado

telemetry is a framework/standard inside the ecosystem to emit events about the internal execution of a code. those events can be used to produce metrics, logs, traces and anything else you can think.
opentelemetry is a library that integrates with the opentelemetry toolset and standard.

telemetry events can be consumed to generate opentelemetry traces, logs and metrics but is not limited to it. for example, the same event telemetry event can generate a trace to opentelemetry and a metric on prometheus, and a log line.

on a systems side thing it’s like telemetry is ebpf for elixir/erlang code, and opentelemetry is more like tetragon.

venkatd

venkatd OP

Thanks this really clears it up!

So I suppose it would be considered a good practice to have code produce telemetry events (which is agnostic to how it would be consumed) and somewhere else one might forward telemetry events to opentelemetry?

Actually it seems like this is what opentelemetry_ecto is doing:
https://github.com/open-telemetry/opentelemetry-erlang-contrib/blob/main/instrumentation/opentelemetry_ecto/lib/opentelemetry_ecto.ex

It is calling :telemetry.attach to listen to telemetry events coming from Ecto, then it translates that to a format that opentelemetry understands.

So it seems like telemetry is almost like a logging solution but a lot broader (not just text messages). It does nothing to specify how those messages are actually handled.

cevado

cevado

usually telemetry is used for libraries, so they can expose their execution steps to the external world. while opentelemetry you gonna use on your actual application. on application side you usually just need to worry about telemetry if you want to attach to some event.

— All posts loaded —

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
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
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
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

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
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
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews