opentelemetry-erlang-contrib/instrumentation/opentelemetry_nebulex
Andrew Rosa dfed96874f
Add Nebulex instrumentation library (#83)
Add instrumentation for Nebulex, a distributed cache library. This
library provides solid telemetry support for this initial
implementation.

Caching implementation is mostly based on in-memory storage (like ETS)
and RPC calls for distribution (via OTP libraries, like :erpc). AFAICT,
there is not much specifics for how to translate into Semantic
Attributes: those caches are not quite a DB, except maybe for the one
which implements the storage; the RPC can't be reliably captured
either.

Given the above constraints, this initial implementation instruments the
library via custom attributes (namespaced as `nebulex.*`). It's not 100%
clear the behaviour of OTel for actual distributed caches - from my
tests, that may create some orphan spans. I think that's fine as first
release.

Nebulex follow the patterns of Ecto, so this instrumentation follows a
similar pattern of OpentelemetryEcto. It does include a `setup_all/1`
function for convenience, that leverages the :init events Nebulex emit
on process start.

Co-authored-by: Tristan Sloughter <t@crashfast.com>
2022-12-14 17:38:18 -07:00
..
config Add Nebulex instrumentation library (#83) 2022-12-14 17:38:18 -07:00
lib Add Nebulex instrumentation library (#83) 2022-12-14 17:38:18 -07:00
test Add Nebulex instrumentation library (#83) 2022-12-14 17:38:18 -07:00
.formatter.exs Add Nebulex instrumentation library (#83) 2022-12-14 17:38:18 -07:00
.gitignore Add Nebulex instrumentation library (#83) 2022-12-14 17:38:18 -07:00
CHANGELOG.md Add Nebulex instrumentation library (#83) 2022-12-14 17:38:18 -07:00
LICENSE Add Nebulex instrumentation library (#83) 2022-12-14 17:38:18 -07:00
README.md Add Nebulex instrumentation library (#83) 2022-12-14 17:38:18 -07:00
mix.exs Add Nebulex instrumentation library (#83) 2022-12-14 17:38:18 -07:00
mix.lock Add Nebulex instrumentation library (#83) 2022-12-14 17:38:18 -07:00

README.md

OpentelemetryNebulex

OpentelemetryNebulex uses telemetry handlers to create OpenTelemetry spans from Nebulex command events.

Installation

The package can be installed by adding opentelemetry_nebulex to your list of dependencies in mix.exs:

  def deps do
    [
      {:opentelemetry_nebulex, "~> 0.1.0"}
    ]
  end

Compatibility Matrix

OpentelemetryNebulex Version Otel Version Notes
v0.1.0 v1.0.0

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/opentelemetry_nebulex.