Class: Langfuse::OtelSpanPatch

Inherits:
Data
  • Object
show all
Defined in:
lib/langfuse/otel_span_masking.rb

Overview

Attribute changes for one exported OpenTelemetry span.

Deletes run before sets, so a set wins when the same key is in both fields.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(set_attributes: {}, delete_attributes: []) ⇒ OtelSpanPatch

Parameters:

  • set_attributes (Object) (defaults to: {})

    attributes to add or replace

  • delete_attributes (Object) (defaults to: [])

    attribute keys to remove

Raises:

  • (ArgumentError)

    if an unknown keyword is given



72
73
74
# File 'lib/langfuse/otel_span_masking.rb', line 72

def initialize(set_attributes: {}, delete_attributes: [])
  super
end

Instance Attribute Details

#delete_attributesArray<String> (readonly)

Returns attribute keys to remove.

Returns:

  • (Array<String>)

    attribute keys to remove



67
68
69
70
71
72
73
74
75
# File 'lib/langfuse/otel_span_masking.rb', line 67

OtelSpanPatch = Data.define(:set_attributes, :delete_attributes) do
  # @param set_attributes [Object] attributes to add or replace
  # @param delete_attributes [Object] attribute keys to remove
  # @return [OtelSpanPatch]
  # @raise [ArgumentError] if an unknown keyword is given
  def initialize(set_attributes: {}, delete_attributes: [])
    super
  end
end

#set_attributesHash (readonly)

Returns attributes to add or replace.

Returns:

  • (Hash)

    attributes to add or replace



67
68
69
70
71
72
73
74
75
# File 'lib/langfuse/otel_span_masking.rb', line 67

OtelSpanPatch = Data.define(:set_attributes, :delete_attributes) do
  # @param set_attributes [Object] attributes to add or replace
  # @param delete_attributes [Object] attribute keys to remove
  # @return [OtelSpanPatch]
  # @raise [ArgumentError] if an unknown keyword is given
  def initialize(set_attributes: {}, delete_attributes: [])
    super
  end
end