- Overhead is very low. The functions in the NIF do nothing more than receive data and send it to a worker thread, so that the C function can return immediately. It’s designed to be as fast as possible while having very little impact on the calling thread, and generate minimal garbage collection load.
- It allows the use of the same library and agent used by AppSignal for Ruby, which runs on thousands of production servers all over the world. It’s battle tested technology, processing a combined 1 billion requests per day (November 2016).
- The library and agent are written in Rust, and its primary design considerations were (and remain) robustness and performance.
AppSignal for Elixir
Why a NIF?
The AppSignal for Elixir integration relies on a NIF that calls out to a library to do the heavy lifting, written in Rust. Its job is to receive data from the Elixir app, normalize it and write it to a separate agent process over a Unix socket. The agent then sends the data to AppSignal.com periodically for further processing. See our how AppSignal operates page more information about how our agent works.
While using a NIF has inherent risks, using one in this case has several advantages: