Class: Langfuse::Configuration

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

Overview

Configuration class for Langfuse client settings

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/langfuse.rb', line 166

def initialize
  @public_key = nil
  @secret_key = nil
  @host = 'https://us.cloud.langfuse.com'
  @debug = false
  @timeout = 30
  @retries = 3
  @flush_interval = 5
  @auto_flush = true
  @ingestion_mode = :legacy # :legacy or :otel
  @environment = nil       # default tracing environment for all events
  @sample_rate = nil       # 0.0..1.0, nil disables sampling
  @mask = nil              # callable applied to input/output/metadata before sending
  @flush_at = 15           # flush as soon as this many events are queued
  @logger = nil            # custom Logger instance
  @shutdown_on_exit = true # register an at_exit hook that flushes pending events
end

Instance Attribute Details

#auto_flushObject

Returns the value of attribute auto_flush.



163
164
165
# File 'lib/langfuse.rb', line 163

def auto_flush
  @auto_flush
end

#debugObject

Returns the value of attribute debug.



163
164
165
# File 'lib/langfuse.rb', line 163

def debug
  @debug
end

#environmentObject

Returns the value of attribute environment.



163
164
165
# File 'lib/langfuse.rb', line 163

def environment
  @environment
end

#flush_atObject

Returns the value of attribute flush_at.



163
164
165
# File 'lib/langfuse.rb', line 163

def flush_at
  @flush_at
end

#flush_intervalObject

Returns the value of attribute flush_interval.



163
164
165
# File 'lib/langfuse.rb', line 163

def flush_interval
  @flush_interval
end

#hostObject

Returns the value of attribute host.



163
164
165
# File 'lib/langfuse.rb', line 163

def host
  @host
end

#ingestion_modeObject

Returns the value of attribute ingestion_mode.



163
164
165
# File 'lib/langfuse.rb', line 163

def ingestion_mode
  @ingestion_mode
end

#loggerObject

Returns the value of attribute logger.



163
164
165
# File 'lib/langfuse.rb', line 163

def logger
  @logger
end

#maskObject

Returns the value of attribute mask.



163
164
165
# File 'lib/langfuse.rb', line 163

def mask
  @mask
end

#public_keyObject

Returns the value of attribute public_key.



163
164
165
# File 'lib/langfuse.rb', line 163

def public_key
  @public_key
end

#retriesObject

Returns the value of attribute retries.



163
164
165
# File 'lib/langfuse.rb', line 163

def retries
  @retries
end

#sample_rateObject

Returns the value of attribute sample_rate.



163
164
165
# File 'lib/langfuse.rb', line 163

def sample_rate
  @sample_rate
end

#secret_keyObject

Returns the value of attribute secret_key.



163
164
165
# File 'lib/langfuse.rb', line 163

def secret_key
  @secret_key
end

#shutdown_on_exitObject

Returns the value of attribute shutdown_on_exit.



163
164
165
# File 'lib/langfuse.rb', line 163

def shutdown_on_exit
  @shutdown_on_exit
end

#timeoutObject

Returns the value of attribute timeout.



163
164
165
# File 'lib/langfuse.rb', line 163

def timeout
  @timeout
end