elixir_agent icon indicating copy to clipboard operation
elixir_agent copied to clipboard

Add Quantum instrumentation

Open andrewhr opened this issue 3 years ago • 1 comments

Add telemetry based instrumentation, following the patterns used for other libraries, in special NewRelic.Telemetry.Plug.

Transaction names present a bit of challenge, as jobs don't necessary have "stable" names: names can be meaningful atoms or Refs, and task themselves can come as MFA tuples or anonymous fns. The choice here was do approach similar to what Phoenix instrumentation does and do a best effort pattern matching.

All Transaction names include the Scheduler module name, as in theory apps can have as many as they need... but similar to - and even less than - Ecto.Repos, that's not often the case in my experience. Which means names can get longer and noisy. YMMV

Quantum added support for telemetry since 3.2.0, but library requires versions above 3.4.0 due changes on telemetry event contract (earlier versions didn't include :kind for exception events).

andrewhr avatar Aug 27 '21 15:08 andrewhr

Something I've noticed during my tests, looks like Transaction traces are not working for "Other" transaction types. I've tried the same thing with Oban instrumentation (which I didn't published yet) and some manual instrumentation we have in one service here.

There is something I'm missing or it's better to include some bug issue? I would be needed to help investigation?

andrewhr avatar Aug 27 '21 15:08 andrewhr

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar May 02 '23 20:05 CLAassistant