{"id":18135402,"url":"https://github.com/last9/openapm-ruby","last_synced_at":"2025-10-29T20:17:41.165Z","repository":{"id":190675510,"uuid":"682561409","full_name":"last9/openapm-ruby","owner":"last9","description":"APM For Ruby using Open Source Tools","archived":false,"fork":false,"pushed_at":"2023-08-27T03:17:01.000Z","size":23,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-08T01:25:32.752Z","etag":null,"topics":["apm","grafana","monitoring","open-source","prometheus","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/last9.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":null,"governance":null}},"created_at":"2023-08-24T12:44:00.000Z","updated_at":"2025-09-12T05:24:25.000Z","dependencies_parsed_at":"2023-08-25T22:57:58.022Z","dependency_job_id":"432bb759-851a-4592-9608-cc63b107214b","html_url":"https://github.com/last9/openapm-ruby","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.0714285714285714,"last_synced_commit":"bc0639cc039c36bd0dc1b6e08ab329f3e8f0fd72"},"previous_names":["last9/openapm-ruby"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/last9/openapm-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/last9%2Fopenapm-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/last9%2Fopenapm-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/last9%2Fopenapm-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/last9%2Fopenapm-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/last9","download_url":"https://codeload.github.com/last9/openapm-ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/last9%2Fopenapm-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281689655,"owners_count":26544670,"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","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","grafana","monitoring","open-source","prometheus","rails","ruby"],"created_at":"2024-11-01T14:07:11.018Z","updated_at":"2025-10-29T20:17:41.138Z","avatar_url":"https://github.com/last9.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Openapm\n\nAPM for Rack based Ruby applications using Prometheus and Grafana.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'openapm'\n```\n\nAnd then execute:\n\n$ bundle\n\nOr install it yourself as:\n\n$ gem install openapm\n\n## Usage\n\n### Rack application\n\n```ruby\n# config.ru\nrequire 'rack'\nrequire 'openapm/middleware'\n\nuse Rack::Deflater\nuse Openapm::Middleware\n```\n\n### Rails application\n\n``` ruby\n# config/initializers/openapm.rb\n\nunless Rails.env.test?\n  require 'openapm/middleware'\n\n  Rails.application.middleware.unshift Openapm::Middleware\nend\n```\n\nThis will start emitting the RED metrics for HTTP requests on `/metrics` path which can be scraped by a Prometheus.\n\n### Supported labels\n\n1. `path` - HTTP request path, removes id and uuid from the request path.\n2. `method` - HTTP method\n3. `status` - HTTP status code. Eg. 404\n4. `environment` - Rack or Rails enviornment set in the enviornment.\n5. `program` - Application name, defaults to `web-application`. Can be customized by setting `Openapm.default_labels` hash.\n\n### Additional labels\n\nYou can set additional labels by setting `Openapm.default_labels`\n\n``` ruby\nOpenapm.default_labels = { service: 'web-service', stack: 'rails', team: 'platform' }\n```\n\nThese labels will be added to each metric time series by default as static values.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/prathamesh-sonpatki/openapm. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0).\n\n## Code of Conduct\n\nEveryone interacting in the Openapm project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/last9/openapm/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flast9%2Fopenapm-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flast9%2Fopenapm-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flast9%2Fopenapm-ruby/lists"}