Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.13 KB

README.md

File metadata and controls

44 lines (31 loc) · 1.13 KB

OpentelemetryCommanded

Telemetry handler that creates OpenTelemetry spans from Commanded commands and events.

⚠️⚠️ Warning This project is currently in Alpha status⚠️⚠️

Supported spans

OpentelemetryCommanded currently creates spans for:

  • Application Dispatch
  • Aggregate Execute
  • Event.Handler Handle
  • ProcessManager Handle
  • EventStore append_to_stream and stream_forward

Installation

If available in Hex, the package can be installed by adding opentelemetry_commanded to your list of dependencies in mix.exs:

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

Once installed, execute the following function in your application behaviour before your top-level supervisor starts.

# lib/my_app/application.ex
OpentelemetryCommanded.setup()

Then add the OpentelemetryCommanded.Middleware to your Commanded routers

middleware OpentelemetryCommanded.Middleware

Documentation

https://hexdocs.pm/opentelemetry_commanded.