Module: Condux
- Defined in:
- lib/condux.rb,
lib/condux/dsn.rb,
lib/condux/rack.rb,
lib/condux/level.rb,
lib/condux/client.rb,
lib/condux/send_result.rb,
lib/condux/event_payload.rb,
lib/condux/event_transport.rb
Overview
Condux SDK for Ruby — report errors to a Condux relay.
Emits the Sentry "store" wire shape (event_id, timestamp, level, exception.values) so the relay normalizes it exactly like an official Sentry SDK: swap the DSN and it works. Delivery is resilient (429 / 5xx / network failures retry with backoff, honoring Retry-After) and never raises — a failed send returns a SendResult you can inspect. The transport and sleep are injectable so backoff is exercised with no real network or timers. Inspired by common SDK transports, implemented fresh.
Defined Under Namespace
Modules: EventPayload, Level, Rack Classes: Client, Dsn, EventTransport, SendResult
Class Method Summary collapse
-
.capture_exception(error, handled: true) ⇒ Object
Report an exception as an error-level event, with its stack trace.
-
.capture_message(message, level: Level::INFO) ⇒ Object
Report a bare message event at the given level (default info).
-
.init(dsn:, environment: nil, release: nil, max_retries: Client::DEFAULT_MAX_RETRIES, transport: nil, sleep: nil, clock: nil) ⇒ Object
Configure the SDK with a project DSN (and optional testing hooks).
Class Method Details
.capture_exception(error, handled: true) ⇒ Object
Report an exception as an error-level event, with its stack trace. Never raises on delivery failure. Pass handled: false for an uncaught exception (a framework integration does this).
25 26 27 |
# File 'lib/condux.rb', line 25 def capture_exception(error, handled: true) require_client.capture_exception(error, handled: handled) end |
.capture_message(message, level: Level::INFO) ⇒ Object
Report a bare message event at the given level (default info).
30 31 32 |
# File 'lib/condux.rb', line 30 def (, level: Level::INFO) require_client.(, level) end |
.init(dsn:, environment: nil, release: nil, max_retries: Client::DEFAULT_MAX_RETRIES, transport: nil, sleep: nil, clock: nil) ⇒ Object
Configure the SDK with a project DSN (and optional testing hooks).
17 18 19 20 21 |
# File 'lib/condux.rb', line 17 def init(dsn:, environment: nil, release: nil, max_retries: Client::DEFAULT_MAX_RETRIES, transport: nil, sleep: nil, clock: nil) @client = Client.new(dsn: dsn, environment: environment, release: release, max_retries: max_retries, transport: transport, sleep: sleep, clock: clock) end |