Class: Langfuse::MaskingExporter Private
- Inherits:
-
Object
- Object
- Langfuse::MaskingExporter
- Defined in:
- lib/langfuse/masking_exporter.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Export-stage masking wrapper around the Langfuse OTLP exporter.
Only the copy exported to Langfuse is transformed. Original span data and any other OpenTelemetry exporter remain unchanged.
Instance Method Summary collapse
-
#export(span_data, timeout: nil) ⇒ Integer
private
Mask the batch and delegate export.
-
#force_flush(timeout: nil) ⇒ Object
private
Delegate's force_flush result.
-
#initialize(delegate:, hook:, logger:) ⇒ MaskingExporter
constructor
private
A new instance of MaskingExporter.
-
#shutdown(timeout: nil) ⇒ Object
private
Delegate's shutdown result.
Constructor Details
#initialize(delegate:, hook:, logger:) ⇒ MaskingExporter
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of MaskingExporter.
27 28 29 30 31 32 |
# File 'lib/langfuse/masking_exporter.rb', line 27 def initialize(delegate:, hook:, logger:) @delegate = delegate @hook = hook @logger = logger @patch_applier = OtelSpanPatchApplier.new(logger: logger) end |
Instance Method Details
#export(span_data, timeout: nil) ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Mask the batch and delegate export.
39 40 41 42 43 44 |
# File 'lib/langfuse/masking_exporter.rb', line 39 def export(span_data, timeout: nil) masked_spans = mask_batch(span_data.to_a) return SUCCESS if masked_spans.nil? || masked_spans.empty? @delegate.export(masked_spans, timeout: timeout) end |
#force_flush(timeout: nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns delegate's force_flush result.
47 48 49 |
# File 'lib/langfuse/masking_exporter.rb', line 47 def force_flush(timeout: nil) @delegate.force_flush(timeout: timeout) end |
#shutdown(timeout: nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns delegate's shutdown result.
52 53 54 |
# File 'lib/langfuse/masking_exporter.rb', line 52 def shutdown(timeout: nil) @delegate.shutdown(timeout: timeout) end |