{"id":13747286,"url":"https://github.com/appsignal/appsignal-ruby","last_synced_at":"2025-05-14T08:09:37.612Z","repository":{"id":8493845,"uuid":"10100635","full_name":"appsignal/appsignal-ruby","owner":"appsignal","description":"🟥 AppSignal for Ruby gem","archived":false,"fork":false,"pushed_at":"2025-05-05T10:25:28.000Z","size":8130,"stargazers_count":194,"open_issues_count":16,"forks_count":117,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-08T02:16:46.863Z","etag":null,"topics":["apm","appsignal","custom-instrumentation","error-monitoring","host-metrics","metrics","monitoring","performance-monitoring","rails","ruby"],"latest_commit_sha":null,"homepage":"https://www.appsignal.com/ruby","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"timsneath/Gists","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appsignal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-05-16T12:25:54.000Z","updated_at":"2025-05-05T10:25:30.000Z","dependencies_parsed_at":"2023-02-13T19:01:38.869Z","dependency_job_id":"db549121-f4b6-4ab5-a739-c22af715d3e4","html_url":"https://github.com/appsignal/appsignal-ruby","commit_stats":{"total_commits":3321,"total_committers":60,"mean_commits":55.35,"dds":0.5130984643179766,"last_synced_commit":"4d139c294d9d89551bd6d5ba8745375385595189"},"previous_names":[],"tags_count":648,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsignal%2Fappsignal-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsignal%2Fappsignal-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsignal%2Fappsignal-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsignal%2Fappsignal-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appsignal","download_url":"https://codeload.github.com/appsignal/appsignal-ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253908969,"owners_count":21982685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apm","appsignal","custom-instrumentation","error-monitoring","host-metrics","metrics","monitoring","performance-monitoring","rails","ruby"],"created_at":"2024-08-03T06:01:23.917Z","updated_at":"2025-05-14T08:09:32.603Z","avatar_url":"https://github.com/appsignal.png","language":"Ruby","readme":"# AppSignal apm for Ruby\n\nAppSignal solves all your Ruby monitoring needs in a single tool. You and your\nteam can focus on writing code and we'll provide the alerts if your app has any\nissues.\n\n- [AppSignal.com website][appsignal]\n- [Documentation][docs]\n- [Ruby code documentation][ruby-doc]\n- [Support][contact]\n\n## Description\n\nThe AppSignal gem collects exceptions and performance data from your Ruby\napplications and sends it to [AppSignal][appsignal] for analysis. Get alerted\nwhen an error occurs or an endpoint is responding very slowly.\n\nAppSignal aims to provide a one stop solution to all your monitoring needs.\nTrack metrics from your servers with our [Host metrics][host-metrics] and graph\neverything else with our [Custom metrics][custom-metrics] feature.\n\n## Usage\n\nFirst make sure you've installed AppSignal in your application by following the\nsteps in [Installation](#installation).\n\nAppSignal will automatically monitor requests, report any exceptions that are\nthrown and any performance issues that might have occurred.\n\nYou can also add extra information to requests by adding custom instrumentation\nand by adding tags.\n\n### Track any error\n\nCatch any error and report it to AppSignal, even if it doesn't crash a\nrequest.\n\n```ruby\nbegin\n  config = File.read(\"config.yml\")\nrescue =\u003e e\n  Appsignal.report_error(e)\n  # Load alternative config\n  config = { :name =\u003e ENV[\"NAME\"] }\nend\n```\n\nRead more about [Exception handling][exception-handling] in our documentation.\n\n### Tagging\n\nNeed more information with errors and performance issues? Add tags to your\nrequests to identify common factors for problems.\n\n```ruby\nAppsignal.add_tags(\n  :user =\u003e current_user.id,\n  :locale =\u003e I18n.locale\n)\n```\n\nRead more about [Tagging][tagging] in our documentation.\n\n### Custom instrumentation\n\nIf you need more fine-grained instrumentation you can add custom\ninstrumentation anywhere in your code.\n\n```ruby\n# Simple instrumentation\nAppsignal.instrument(\"array_to_hash.expensive_logic\", \"Complex calculations\") do\n  array = [[\"a\", 1], [\"b\", 2], [\"c\", 3]]\n  Hash[array]\nend\n\n# Add the query that you're monitoring\nsql = \"SELECT * FROM posts ORDER BY created_at DESC LIMIT 1\"\nAppsignal.instrument(\"fetch.custom_database\", \"Fetch latest post\", sql) do\n  # ...\nend\n\n# Nested instrumentation calls are also supported!\nAppsignal.instrument(\"fetch.custom_database\", \"Fetch current user\") do\n  # ...\n\n  Appsignal.instrument(\"write.custom_database\", \"Write user update\") do\n    # ...\n  end\nend\n```\n\nRead more about [custom instrumentation][custom-instrumentation] in our\ndocumentation.\n\n## Installation\n\nFirst, [sign up][appsignal-sign-up] for an AppSignal account and add the\n`appsignal` gem to your `Gemfile`. Then, run `bundle install`.\n\n```ruby\n# Gemfile\ngem \"appsignal\"\n```\n\nAfterward, you can use the `appsignal install` command to install AppSignal\ninto your application by using the \"Push API key\". This will guide you through\nour installation wizard.\n\n```sh\nappsignal install [push api key]\n```\n\nDepending on what framework or gems you use some manual integration is\nrequired. Follow the steps in the wizard or consult our [integrations] page for\nhelp.\n\nIf you're stuck feel free to [contact us][contact]!\n\n## Supported frameworks and gems\n\nAppSignal automatically supports a collection of Ruby frameworks and gems,\nincluding but not limited to:\n\n- Ruby on Rails\n- Rack\n- Sinatra\n- Padrino\n- Grape\n- Webmachine\n- Capistrano\n- Sidekiq\n- Delayed Job\n- Resque\n- Rake\n\nAppSignal instrumentation doesn't depend on automatic integrations. It's easy\nto set up [custom instrumentation][custom-instrumentation] to add keep track of\nanything.\n\nFor more detailed information and examples please visit our\n[integrations] page.\n\n## Supported systems\n\nCurrently the AppSignal agent works on most Unix-like operating systems, such\nas most Linux distributions, FreeBSD, macOS, excluding Microsoft Windows.\n\nFor more detailed information please visit our [Supported\nsystems][supported-systems] page.\n\n## Releases\n\nFollowing the process below to release a new version of the Ruby gem.\n\n1. Make sure [mono](https://github.com/appsignal/mono/) is installed by\n   following the installation instructions.\n1. Run: `mono publish`\n   - Mono will automatically bump the version number based on the\n     `.changesets/`.\n   - Mono will automatically update the `CHANGELOG.md` file based on the\n     `.changesets/`.\n1. Confirm with your two-factor authentication token for Rubygems.org, _twice_.\n\n## Development\n\n### Installation\n\nMake sure you have Bundler installed and then use the Rake install task to\ninstall all possible dependencies.\n\n```bash\n# Install Bundler\ngem install bundler\n# Bootstrap the project\nmono bootstrap\n# Install the AppSignal extension and _all_ gems we support.\nbundle exec rake install\n# Only install the AppSignal extension.\nbundle exec rake extension:install\n```\n\n#### Git source for Bundler\n\nWhen specifying a git source for the AppSignal gem in Bundler we do not support\nJRuby. This is because our gemspec defaults to the Ruby implementation for\ninstalling the AppSignal C-extension.\n\n```ruby\n# Gemfile\ngem \"appsignal\",\n  :git =\u003e \"https://github.com/appsignal/appsignal-ruby.git\",\n  :branch =\u003e \"main\"\n```\n\nWhen you need to use a git source of the gem in your JRuby install, you'll need\nto run the following to install the C-extension on JRuby. Note that this\npost-install step is not possible on platforms such as Heroku where the app is\nsent through a deploy pipeline and the app is started immediately after.\n\n```bash\nbundle install\n(cd $(bundle show appsignal)/ext \u0026\u0026 rake)\n```\n\n### Testing\n\n```bash\nbundle exec rspec\n# Or with one file\nbundle exec rspec spec/lib/appsignal_spec.rb\n```\n\nNote that some specs depend on certain other gems to run and if they are not\nloaded RSpec will not run them. See also [Testing with other\ngems](#testing-with-other-gems).\n\n#### Testing with other gems\n\nAppSignal runs in many different configurations. To replicate these\nconfigurations you need to run the spec suite with a specific Gemfile.\n\n```\nBUNDLE_GEMFILE=gemfiles/capistrano2.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/capistrano3.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/dry-monitor.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/grape.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/hanami.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/http5.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/no_dependencies.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/padrino.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/que.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/que_beta.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/rails-3.2.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/rails-4.0.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/rails-4.1.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/rails-4.2.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/rails-5.0.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/rails-5.1.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/rails-5.2.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/rails-6.0.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/resque-1.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/resque-2.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/sequel-435.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/sequel.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/sinatra.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/webmachine.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/redis-4.gemfile bundle exec rspec\nBUNDLE_GEMFILE=gemfiles/redis-5.gemfile bundle exec rspec\n```\n\nIf you have either [RVM][rvm], [rbenv][rbenv] or [chruby][chruby] installed you\ncan also use `rake build_matrix:local:generate` to generate a script that runs\nspecs for all Ruby versions and gem combinations we support.\n\nWe run the suite against all of the Gemfiles mentioned above and on\na number of different Ruby versions.\n\n### Versioning\n\nThis gem uses [Semantic Versioning][semver].\n\nThe `main` branch corresponds to the current stable release of the gem.\n\nThe `develop` branch is used for development of features that will end up in\nthe next minor release.\n\nOpen a Pull Request on the `main` branch if you're fixing a bug. For new new\nfeatures, open a Pull Request on the `develop` branch.\n\nEvery stable and unstable release is tagged in git with a version tag.\n\n## Contributing\n\nThinking of contributing to our gem? Awesome! 🚀\n\nPlease follow our [Contributing guide][contributing-guide] in our\ndocumentation and follow our [Code of Conduct][coc].\n\nAlso, we would be very happy to send you Stroopwafles. Have look at everyone\nwe send a package to so far on our [Stroopwafles page][waffles-page].\n\n## Support\n\n[Contact us][contact] and speak directly with the engineers working on\nAppSignal. They will help you get set up, tweak your code and make sure you get\nthe most out of using AppSignal.\n\nAlso see our [SUPPORT.md file](SUPPORT.md).\n\n[appsignal]: https://www.appsignal.com/ruby\n[appsignal-sign-up]: https://appsignal.com/users/sign_up\n[contact]: mailto:support@appsignal.com\n[coc]: https://docs.appsignal.com/appsignal/code-of-conduct.html\n[waffles-page]: https://www.appsignal.com/waffles\n[docs]: https://docs.appsignal.com\n[ruby-doc]: https://www.rubydoc.info/gems/appsignal\n[contributing-guide]: https://docs.appsignal.com/appsignal/contributing.html\n[supported-systems]: https://docs.appsignal.com/support/operating-systems.html\n[integrations]: https://docs.appsignal.com/ruby/integrations.html\n[custom-instrumentation]: https://docs.appsignal.com/ruby/instrumentation.html\n[front-end-monitoring]: https://docs.appsignal.com/front-end.html\n[exception-handling]: https://docs.appsignal.com/ruby/instrumentation/exception-handling.html\n[tagging]: https://docs.appsignal.com/guides/custom-data/tagging-request.html\n[host-metrics]: https://docs.appsignal.com/metrics/host.html\n[custom-metrics]: https://docs.appsignal.com/metrics/custom.html\n\n[semver]: http://semver.org/\n[rvm]: http://rvm.io/\n[rbenv]: https://github.com/rbenv/rbenv\n[chruby]: https://github.com/postmodern/chruby/\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsignal%2Fappsignal-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappsignal%2Fappsignal-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsignal%2Fappsignal-ruby/lists"}