Module: Dash0::OpenTelemetry

Defined in:
lib/dash0/opentelemetry.rb,
lib/dash0/opentelemetry/boot.rb,
lib/dash0/opentelemetry/version.rb,
lib/dash0/opentelemetry/lifecycle.rb,
lib/dash0/opentelemetry/environment.rb,
lib/dash0/opentelemetry/sdk_configuration.rb,
lib/dash0/opentelemetry/resource/distribution.rb,
lib/dash0/opentelemetry/resource/kubernetes_pod.rb,
lib/dash0/opentelemetry/instrumentation_installer.rb,
lib/dash0/opentelemetry/resource/service_name_fallback.rb

Overview

Namespace for the Dash0 OpenTelemetry distribution for Ruby.

The distribution activates as a side effect of requiring the gem's entry point (require 'dash0-opentelemetry'), typically via RUBYOPT="-r dash0-opentelemetry". Requiring this namespace on its own has no side effects; the boot sequence is triggered explicitly via OpenTelemetry.boot!.

Defined Under Namespace

Modules: Boot, Environment, InstrumentationInstaller, Lifecycle, Resource, SdkConfiguration

Constant Summary collapse

LOG_PREFIX =

Prefix used for all messages the distribution writes to stderr.

'[Dash0 OpenTelemetry Distribution]'
VERSION =
'0.1.0'
MINIMUM_RUBY_VERSION =

Lowest Ruby version the distribution supports. Kept here (in a file that must stay parse-safe on older Rubies) so the requirable entry point can gate on it before requiring anything that uses newer syntax.

'3.3.0'

Class Method Summary collapse

Class Method Details

.boot!Object

Boots the distribution. This is the single entry point that the requirable entry file (lib/dash0-opentelemetry.rb) invokes.



29
30
31
# File 'lib/dash0/opentelemetry.rb', line 29

def self.boot!
  Boot.run
end

.log_debug(message) ⇒ Object

Logs a debug-level message to stderr, only when DASH0_DEBUG=true.



39
40
41
42
43
# File 'lib/dash0/opentelemetry.rb', line 39

def self.log_debug(message)
  return unless Environment.debug?

  warn "#{LOG_PREFIX} #{message}"
end

.log_error(message) ⇒ Object

Logs an error-level message to stderr. Always emitted.



34
35
36
# File 'lib/dash0/opentelemetry.rb', line 34

def self.log_error(message)
  warn "#{LOG_PREFIX} #{message}"
end