Method: Sentry::Client#initialize
- Defined in:
- lib/sentry/client.rb
#initialize(configuration) ⇒ Client
Returns a new instance of Client.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/sentry/client.rb', line 33 def initialize(configuration) @configuration = configuration @sdk_logger = configuration.sdk_logger if transport_class = configuration.transport.transport_class @transport = transport_class.new(configuration) else @transport = case configuration.dsn&.scheme when "http", "https" HTTPTransport.new(configuration) else DummyTransport.new(configuration) end end @spotlight_transport = SpotlightTransport.new(configuration) if configuration.spotlight if configuration.enable_logs @log_event_buffer = LogEventBuffer.new(configuration, self) end if configuration.enable_metrics @metric_event_buffer = MetricEventBuffer.new(configuration, self) end end |