Skip to content

simplebet/opentelemetry_commanded

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.