hauleth
OpenCensus gains new integrations with Elixir libraries
As tracing and metrics gathering seems to still be problem for some of the newcomers I have started few projects to improve that by utilising OpenCensus. During my last 2 days of work I have added few 3 new libraries to the OpenCensus BEAM organisation:
- DataDog - support for DogStatsD metrics and for DataDog’s APM traces.
plugintegration (not yet released on Hex) - tracing and measurements. For now there is support for pipeline as a whole, maybe in future I will add “per plug” support.telemetryintegration (not yet released on Hex) - measurements.
Future libraries:
- Phoenix integration - maybe, maybe not. I am not sure how much it will be needed when Phoenix integrate
telemetry. Maybe tracing, but that would be covered byopencensus_pluglibrary - Ecto integration - while measurements are covered by
opencensus_telemetry, support for traces would still be desirable, however no idea how to support it right now - Wrapper library for
erlang:trace/3- this would be really interesting project, that would allow us to trace enormous amount of data. However there are few problems I see right now, and finding solution for them can be a little bit costly, so for now it is left deep in the backlog.
Let me know what other libraries and integrations you would like to see.
Most Liked
ferd
Using trace data is likely a bad idea. There can only be one tracer at any point in time (no concurrency), so if you integrate it to the metrics, nobody can use it to debug at the same time.
GregMefford
I’m happy to see that OpenCensus is gaining more traction in the BEAM ecosystem! I think it was about 6-9 months ago that I last checked and it didn’t seem like there was enough there yet to go all in, but now it seems that there are a number of people working on it. ![]()
I am maintaining the Spandex project along with @zachdaniel, with the goal of being an OpenTracing-compatible API that supports multiple vendor back-ends, very similar to the goals of OpenCensus. Currently, we only support DataDog APM as a back-end, but I think it should be relatively simple to support others if someone wanted to (and I’d love to know where they got stuck if it didn’t work out). We’re also looking forward to using Telemetry to collect span data in the future as more libraries support it. In the meantime, you may be interested to look at how Spandex integrates with Plug/Phoenix and Ecto. We have an example project that demonstrates how to integrate Spandex into an existing app, if you’re curious (see the links in the README for a code diff).
Also, as you probably know, several vendors have their own first-party support for tracing that is proprietary to only their back-ends, but mostly open-source (e.g. AppSignal, New Relic, Scout).
I’d be interested to look more into how the OpenCensus BEAM core compares to Spandex, and see whether there’s anything that can be shared somehow so everybody wins.
tristan
The tracing quickstart has been updated to include Elixir code examples OpenCensus
Plus a reporter for the opencensus agent has been published: GitHub - opencensus-beam/opencensus_service: Library for reporting spans and metrics to OpenCensus Service over grpc · GitHub
Using the agent gives you zPages, support for more trace backends and a collector with intelligent sampling.
Popular in Discussions
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
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









