The project is in a healthy, maintained state
Gemma client che cattura eccezioni e le statistiche di query e metodi lenti e le invia, fire-and-forget, all'endpoint di ingest di CloseYourIt.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

 Project Readme

CloseYourIt Ruby SDK

Official Ruby client for CloseYourIt, the open source tracker for errors, logs, uptime and servers. Add the gem to a Rails application and it sends:

  • Exceptions, in Sentry event format, to /api/v1/projects/:id/events: grouped and triaged in the error tracker.
  • Slow queries and methods, to /api/v1/projects/:id/metrics: grouped by signature with duration aggregates.
  • Structured logs, background job errors and metrics, handled errors and messages.

It adds request context, user, tags and breadcrumbs, sends in the background (never blocks a request, never crashes the app), is a no-op until configured and keeps PII out unless you turn it on.

Install

# Gemfile
gem "closeyourit-ruby"

Configuration

In CloseYourIt, create a token in Member → Project → tokens: you get the bearer secret (shown once) and the project UUID.

# config/initializers/closeyourit.rb
CloseYourIt.init do |c|
  c.endpoint_url = ENV["CLOSEYOURIT_ENDPOINT_URL"]   # https://app.closeyour.it, or your own installation
  c.token        = ENV["CLOSEYOURIT_TOKEN"]
  c.project_id   = ENV["CLOSEYOURIT_PROJECT_ID"]
  c.environment  = Rails.env
end

Without endpoint_url, token and project_id the gem does nothing. In production an http:// endpoint is refused, because the token would travel in clear text.

Full guide, with every option, slow queries, job metrics, forking servers and privacy: closeyour.it/docs/sdk-ruby.

Development

mise install
bundle install
bundle exec rubocop
bundle exec rspec

Contributing

Pull requests are welcome: read CONTRIBUTING.md and CLA.md. This repository is a published copy: accepted changes are applied to the upstream source and come back here with the next release. Report vulnerabilities as described in SECURITY.md.

License

MIT, see LICENSE.txt.