hauleth

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.
  • plug integration (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.
  • telemetry integration (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 by opencensus_plug library
  • 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

ferd

Author of Property-Based Testing with PropEr, LYSE, & Erlang in Anger

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

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. :rocket:

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

tristan

Rebar3 Core Team

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.

Where Next?

Popular in Discussions Top

marciol
Please, let me know if this kind of discussion already took place in another topic . Hi all, how do you consider if is better to build ...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
AstonJ
If a newbie asked you about Phoenix Contexts, how would you explain the basics to them? Feel free to be as concise or in-depth as you li...
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 14049 124
New
Ankhers
Just a little information upfront. Generally speaking, if I feel like I need to either break a pipe chain or use an anonymous function in...
New
tmbb
This is a post to discuss the new Phoenix LiveView functionality. From Chris’s talk, it appears that they generate all HTML on the serve...
342 18272 126
New
PragTob
Hey everyone, this has been brewing in my head some time and it came up again while reading Adopting Elixir. GenServers, supervisors et...
New
jer
I’ve been using umbrellas for a while, and generally started off (on greenfield projects at least) by isolating subapps based on clearly ...
New
griffinbyatt
Sobelow Sobelow is a security-focused static analysis tool for the Phoenix framework. For security researchers, it is a useful tool for g...
New
scouten
I’m looking for a host for the server part of a small (personal) side project that I’m working on. It’s currently written in Node.js and ...
New

Other popular topics Top

albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31194 112
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New

We're in Beta

About us Mission Statement