Module: Watchforge
- Defined in:
- lib/watchforge.rb,
lib/watchforge/dsn.rb,
lib/watchforge/client.rb,
lib/watchforge/context.rb,
lib/watchforge/tracing.rb,
lib/watchforge/version.rb,
lib/watchforge/transport.rb,
lib/watchforge/api/client.rb,
lib/watchforge/api/issues.rb,
lib/watchforge/api/traces.rb,
lib/watchforge/api/monitors.rb,
lib/watchforge/api/dashboard.rb
Defined Under Namespace
Modules: API, DSN, Tracing
Classes: Client, Context, ParsedDSN, Span, Transaction, Transport
Constant Summary
collapse
- VERSION =
"0.1.1"
- SDK_NAME =
"watchforge-ruby-sdk"
Class Method Summary
collapse
-
.capture_check_in(monitor_slug:, status: "ok", monitor_config: nil, check_in_id: nil, environment: nil) ⇒ Object
-
.capture_exception(error, extra: nil) ⇒ Object
-
.capture_message(message, level: "info", extra: nil) ⇒ Object
-
.client ⇒ Object
-
.context ⇒ Object
-
.finish_transaction(status = "ok") ⇒ Object
-
.get_current_transaction ⇒ Object
-
.init(dsn:, environment: "production", release: nil, debug: false) ⇒ Object
-
.start_transaction(transaction, transaction_name = nil, op = "http.server") ⇒ Object
Class Method Details
.capture_check_in(monitor_slug:, status: "ok", monitor_config: nil, check_in_id: nil, environment: nil) ⇒ Object
33
34
35
36
37
38
39
40
41
|
# File 'lib/watchforge.rb', line 33
def capture_check_in(monitor_slug:, status: "ok", monitor_config: nil, check_in_id: nil, environment: nil)
client&.capture_check_in(
monitor_slug: monitor_slug,
status: status,
monitor_config: monitor_config,
check_in_id: check_in_id,
environment: environment
)
end
|
.capture_exception(error, extra: nil) ⇒ Object
25
26
27
|
# File 'lib/watchforge.rb', line 25
def capture_exception(error, extra: nil)
client&.capture_exception(error, extra: )
end
|
.capture_message(message, level: "info", extra: nil) ⇒ Object
29
30
31
|
# File 'lib/watchforge.rb', line 29
def capture_message(message, level: "info", extra: nil)
client&.capture_message(message, level: level, extra: )
end
|
.client ⇒ Object
21
22
23
|
# File 'lib/watchforge.rb', line 21
def client
@client
end
|
.context ⇒ Object
55
56
57
|
# File 'lib/watchforge.rb', line 55
def context
client&.context || Context.new
end
|
.finish_transaction(status = "ok") ⇒ Object
.get_current_transaction ⇒ Object
.init(dsn:, environment: "production", release: nil, debug: false) ⇒ Object
17
18
19
|
# File 'lib/watchforge.rb', line 17
def init(dsn:, environment: "production", release: nil, debug: false)
@client = Client.new(dsn: dsn, environment: environment, release: release, debug: debug)
end
|
.start_transaction(transaction, transaction_name = nil, op = "http.server") ⇒ Object
43
44
45
|
# File 'lib/watchforge.rb', line 43
def start_transaction(transaction, transaction_name = nil, op = "http.server")
Tracing.start_transaction(transaction, transaction_name, op)
end
|