struct

OpenTelemetry::InstrumentationDocumentation::CrystalHttpServer

Inherits Struct / Value / Object

OpenTelemetry::Instrumentation::CrystalHttpServer

Instruments:

  • HTTP::Server
  • HTTP::Handler
  • HTTP::RequestProcessor

Reference: https://crystal-lang.org/api/latest/HTTP/Server.html

The HTTP::Server implementation, provided in the Crystal standard library, is utilized by most Crystal web frameworks. It provides a simple HTTP 1.x compliant server that applications can use to receive requests and to issue responses.

The OpenTelemetry instrumentation of HTTP::Server will generate traces for each request, from the start to the end of it's handling.

Configuration

  • OTEL_CRYSTAL_DISABLE_INSTRUMENTATION_HTTP_SERVER

    If set, this will disable the HTTP::WebServer instrumentation.

Version Restrictions

  • Crystal >= 1.0.0

Methods Affected

  • HTTP::Server#handle_client
  • HTTP::Handler#call_next
  • HTTP::RequestProcessor#process

Constructors

Instance methods

initialize
Source