Module: Chronos
- Defined in:
- lib/chronos.rb,
lib/chronos/core.rb,
lib/chronos/agent.rb,
lib/chronos/ports.rb,
lib/chronos/errors.rb,
lib/chronos/version.rb,
lib/chronos/adapters.rb,
lib/chronos/internal.rb,
lib/chronos/application.rb,
lib/chronos/core/notice.rb,
lib/chronos/configuration.rb,
lib/chronos/core/sanitizer.rb,
lib/chronos/ports/transport.rb,
lib/chronos/core/runtime_info.rb,
lib/chronos/core/notice_builder.rb,
lib/chronos/core/safe_serializer.rb,
lib/chronos/internal/safe_logger.rb,
lib/chronos/internal/worker_pool.rb,
lib/chronos/core/backtrace_parser.rb,
lib/chronos/internal/bounded_queue.rb,
lib/chronos/core/payload_serializer.rb,
lib/chronos/adapters/net_http_transport.rb,
lib/chronos/core/sensitive_value_filter.rb,
lib/chronos/application/capture_exception.rb,
lib/chronos/core/exception_cause_collector.rb
Overview
Framework-independent public facade for the Chronos Ruby agent.
Defined Under Namespace
Modules: Adapters, Application, Core, Internal, Ports
Classes: Agent, Configuration, ConfigurationError, Error
Constant Summary
collapse
- VERSION =
Current version of the legacy Chronos Ruby agent.
"0.2.0.pre.1".freeze
Class Method Summary
collapse
Class Method Details
.close(timeout = Agent::DEFAULT_FLUSH_TIMEOUT) ⇒ Object
84
85
86
87
88
89
90
91
92
93
|
# File 'lib/chronos.rb', line 84
def close(timeout = Agent::DEFAULT_FLUSH_TIMEOUT)
agent = @mutex.synchronize do
current = @agent
@agent = nil
current
end
agent ? agent.close(timeout) : true
rescue StandardError
false
end
|
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/chronos.rb', line 46
def configure
configuration = Configuration.new
yield configuration if block_given?
agent = Agent.new(configuration.snapshot)
previous = nil
@mutex.synchronize do
previous = @agent
@agent = agent
end
previous.close if previous
configuration
end
|
73
74
75
|
# File 'lib/chronos.rb', line 73
def configured?
!current_agent.nil?
end
|
.flush(timeout = Agent::DEFAULT_FLUSH_TIMEOUT) ⇒ Object
77
78
79
80
81
82
|
# File 'lib/chronos.rb', line 77
def flush(timeout = Agent::DEFAULT_FLUSH_TIMEOUT)
agent = current_agent
agent ? agent.flush(timeout) : true
rescue StandardError
false
end
|
.notify(exception, context = {}) ⇒ Object
59
60
61
62
63
64
|
# File 'lib/chronos.rb', line 59
def notify(exception, context = {})
agent = current_agent
agent ? agent.notify(exception, context) : false
rescue StandardError
false
end
|
.notify_sync(exception, context = {}) ⇒ Object
66
67
68
69
70
71
|
# File 'lib/chronos.rb', line 66
def notify_sync(exception, context = {})
agent = current_agent
agent ? agent.notify_sync(exception, context) : false
rescue StandardError
false
end
|