Skip to content

0.24.0

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 10 Feb 15:19

Features

  • Add structured logs support (#509)

Read the full documentation for more details.

Sentry.init {
    it.dsn = "YOUR_DSN"
    // Enable logs to be sent to Sentry
    it.logs.enabled = true
}

// Simple API
Sentry.logger.warn("Rate limit reached for %s", endpoint) {
  this["currentRequests"] = 120
  this["limit"] = 100
  this["retryAfterSeconds"] = 60
}

// Full DSL
Sentry.logger.fatal {
    message("Database connection pool exhausted for %s", dbHost)
    attributes {
        this["database"] = "users"
        this["activeConnections"] = 100
    }
}