hst337
How to convert telemetry to opentelemetry
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!
Most Liked
benwilson512
If you look at libraries like OpenTelemetryOban you can see that the common pattern is to create :telemetry hooks 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
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 scratch
hst337
I thought so too, but it turns out that telemetry.span generates unique span context in metadata for every span, so it is possible to convert a telemetry span to opentelemetry span.
Popular in Questions
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








