Class: Foam::Otel::MaskedSpanView

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/foam/otel/pipelines.rb

Overview

The tenant-seam MASKED VIEW (credential-floor design §5.4 / rule 18 C): the Ruby SDK freezes span attributes at finish BEFORE any on_finish processor runs (GOTCHAS F1), so foam cannot rewrite the span a tenant sees — instead the guarded wrappers below hand tenants a READ-ONLY delegator whose attributes/events/links/to_span_data are served from the SAME Redaction.mask_span_data pass foam's exporter applies (the credential floor + the customer's init-time key lists). Tenants only ever see the masked view — a raw floor value never crosses the seam, third-party instrumentation attributes included. Everything else (name, kind, context, status, resource, scope…) delegates to the real span untouched.

Instance Method Summary collapse

Constructor Details

#initialize(span, masked_span_data) ⇒ MaskedSpanView

Returns a new instance of MaskedSpanView.



183
184
185
186
# File 'lib/foam/otel/pipelines.rb', line 183

def initialize(span, masked_span_data)
  super(span)
  @masked = masked_span_data
end

Instance Method Details

#attributesObject



188
# File 'lib/foam/otel/pipelines.rb', line 188

def attributes = @masked.attributes

#eventsObject



189
# File 'lib/foam/otel/pipelines.rb', line 189

def events = @masked.events


190
# File 'lib/foam/otel/pipelines.rb', line 190

def links = @masked.links

#to_span_dataObject



191
# File 'lib/foam/otel/pipelines.rb', line 191

def to_span_data = @masked