class OpenTelemetry::Middleware

Overview

An HTTP::Handler compatible with any HTTP::Server-based framework, including Lucky and Amber.

For plain HTTP::Server:

http = HTTP::Server.new([
  HTTP::LogHandler.new,
  OpenTelemetry::Middleware.new("top-level-span-name"),
  YourApp.new,
])

Included Modules

Defined in:

opentelemetry.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String) #

[View source]

Instance Method Detail

def call(context : HTTP::Server::Context) #

[View source]