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.



196
197
198
199
# File 'lib/foam/otel/pipelines.rb', line 196

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

Instance Method Details

#attributesObject



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

def attributes = @masked.attributes

#eventsObject



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

def events = @masked.events


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

def links = @masked.links

#to_span_dataObject



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

def to_span_data = @masked