Class: DristiClient::Client
- Inherits:
-
Object
- Object
- DristiClient::Client
- Defined in:
- lib/dristi_client/client.rb
Constant Summary collapse
- FALLBACK_FILE =
"tmp/dristi_fallback.jsonl"
Instance Method Summary collapse
- #capture(exception, context = {}) ⇒ Object
-
#initialize(configuration) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(configuration) ⇒ Client
Returns a new instance of Client.
12 13 14 |
# File 'lib/dristi_client/client.rb', line 12 def initialize(configuration) @configuration = configuration end |
Instance Method Details
#capture(exception, context = {}) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/dristi_client/client.rb', line 16 def capture(exception, context = {}) return unless @configuration.enabled return unless @configuration.valid? return if ignored?(exception) payload = build_payload(exception, context) Thread.new do post_with_retry(payload) end end |