Parses a DSN and returns a connection object used by gt_capture().
If dsn is empty or missing, a inactive connection is returned and
gt_capture() will be a no-op — the application continues to run normally.
Usage
gt_connect(dsn = Sys.getenv("GLITCHTIP_DSN"))
# S3 method for class 'gt_connection'
print(x, ...)
Arguments
- dsn
DSN string in the format https://KEY@HOST/PROJECT_ID.
Defaults to the GLITCHTIP_DSN environment variable.
- x
A gt_connection object.
- ...
Ignored. Present for S3 method compatibility.
Value
A gt_connection object.
Examples
# From environment variable (recommended)
gt <- gt_connect()
# Explicit DSN
gt <- gt_connect("https://key@glitchtip.example.com/1")