Module: Foam::Otel::Diagnostics

Defined in:
lib/foam/otel/diagnostics.rb

Overview

Self-diagnostics (BASE_PACKAGE_SPEC rule 15). Every swallowed error and every coexistence/override decision is announced with a [foam] prefix so "no data" is a readable reason, never a mystery. diagnostics: true turns on the verbose, healthy-path narration; warnings and error states are ALWAYS loud regardless.

Class Method Summary collapse

Class Method Details

.info(message) ⇒ Object

Verbose only under diagnostics: true — the healthy-path narration ("init ok: N instrumentations active", export retries, drop counts).



21
22
23
24
25
# File 'lib/foam/otel/diagnostics.rb', line 21

def info(message)
  return unless Foam::Otel.active_config.diagnostics

  Kernel.warn("[foam] #{message}")
end

.warn(message) ⇒ Object

Loud always — coexistence warnings, missing-config, overrides, and swallowed errors. These are the states an operator must see.



15
16
17
# File 'lib/foam/otel/diagnostics.rb', line 15

def warn(message)
  Kernel.warn("[foam] #{message}")
end