hst337
I have a lot of libraries which emit telemetry events, and I’d like to covert them into OpenTelemetry spans. I’ve found the opentelemetry_telemetry library, but examples there do not work and it looks heavily outdated, without proper documentation, plus :telemetry doesn’t allow attaching to event by prefix, so I have to write some strange and hacky code to translate spans from one library to another.
It would be nice if anyone could share their experience here, thanks!
Trending in Questions
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
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
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
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
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted”
Version...
New
Other Trending Topics
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
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
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
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
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
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
michallepicki
Tricky subject, but I wouldn’t say that the
telemetrylibrary itself has any notion ofspans? It’s main purpose is dynamic dispatch, and maybe some specific library emits events that are aware ofspansAre you looking for some way to reduce code boilerplate that can be found in libraries like these ones from opentelemetry-erlang-contrib?
benwilson512
If you look at libraries like
OpenTelemetryObanyou can see that the common pattern is to create:telemetryhooks that then initiate open telemetry spans. This allows you to stick with the more general purpose telemetry library while also enabling people who use open telemetry to get otel spans out.hst337
I thought so too, but it turns out that
telemetry.spangenerates unique span context in metadata for every span, so it is possible to convert a telemetry span to opentelemetry span.hst337
Yeah, I’ve seen it, and just took a look again, but it feels really annoying to write the same boilerplate for something which
telemetry.spanalready does out of the box. I want a solution where every span from telemetry is automatically exported in an opentelemetry format. And I don’t see any limitations for this solution, do you?benwilson512
The limitation is that if someone wants to get spans from your library and export them to say app signal they have to convert otel spans to app signal spans which is a lot heavier weight than regular telemetry spans to app signal spans.
End users of your library that aren’t doing otel will end up pulling in a bunch of dependencies as well.
hst337
You got me wrong. I am not suggesting writing telemetry in otel always. I am suggesting to have a relay which automatically converts all telemetry spans to otel spans, and as far as I can see, there are no limitations for this, but still, every
opentelemetry_*library writes this boilerplate from scratchtristan
The first point about AppSignal is a good one But there are not a “bunch of dependencies” that will be pulled in . A library should only depend on
opentelemetry_apiwhich itself has 0 dependenciesbside
I’m not sure what trouble you’re having here. The bridge library is up to date and used by probably half of our instrumentation libraries. Perhaps you could elaborate here or pop into opentelemetry on the Elixir Slack for help.
hst337
I want to automatically convert telemetry span events to opentelemetry spans. I know that the generic solution is possible, but I can’t implement it yet with the knowledge I have right now
bside
It is possible but it has additional requirements. There is no way to try to create spans from every possible event in the system without a mechanism to register the events.
Please note, this undocumented experimental functionality is being removed from this library so do not rely on it.
https://github.com/open-telemetry/opentelemetry-erlang-contrib/blob/main/utilities/opentelemetry_telemetry/src/otel_telemetry.erl#L28-L36