venkatd

venkatd

What is the relationship between telemetry and opentelemetry?

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!

Marked As Solved

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.

Also Liked

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.

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.

venkatd

venkatd

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

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:

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.

Where Next?

Popular in Questions Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
Phillipp
Hey, I have a NanoPi-M3 and try to install Elixir on their Ubuntu image. I followed the Raspberry Pi installation instructions from the ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
wernerlaude
In AR this is so simple @articles = current_user.articles How to do in Ecto? def index(conn, _params) do current_user = conn.assig...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3268 119930 1237
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
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
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New

We're in Beta

About us Mission Statement