{"id":23421151,"url":"https://github.com/nhsdigital/ndr_browser_timings","last_synced_at":"2026-05-07T11:32:29.449Z","repository":{"id":42363886,"uuid":"259381905","full_name":"NHSDigital/ndr_browser_timings","owner":"NHSDigital","description":"Rails engine to performs client-side instrumentation and feeds back to the application.","archived":false,"fork":false,"pushed_at":"2025-10-21T20:43:21.000Z","size":99,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-10-21T22:25:37.623Z","etag":null,"topics":["browser","instrumentation","javascript","rails"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NHSDigital.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-27T16:00:48.000Z","updated_at":"2025-02-05T19:41:31.000Z","dependencies_parsed_at":"2024-11-22T15:27:31.387Z","dependency_job_id":"0f6ae72a-5786-4d47-9162-8cf48cde83db","html_url":"https://github.com/NHSDigital/ndr_browser_timings","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/NHSDigital/ndr_browser_timings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHSDigital%2Fndr_browser_timings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHSDigital%2Fndr_browser_timings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHSDigital%2Fndr_browser_timings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHSDigital%2Fndr_browser_timings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NHSDigital","download_url":"https://codeload.github.com/NHSDigital/ndr_browser_timings/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NHSDigital%2Fndr_browser_timings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32735119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["browser","instrumentation","javascript","rails"],"created_at":"2024-12-23T02:14:11.833Z","updated_at":"2026-05-07T11:32:29.432Z","avatar_url":"https://github.com/NHSDigital.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NdrBrowserTimings [![Build Status](https://github.com/NHSDigital/ndr_browser_timings/workflows/Test/badge.svg)](https://github.com/NHSDigital/ndr_browser_timings/actions?query=workflow%3Atest) [![Gem Version](https://badge.fury.io/rb/ndr_browser_timings.svg)](https://rubygems.org/gems/ndr_browser_timings)\n\nThis Rails Engine adds JavaScript that allows for the collection of users' browser timing information.\n\n## Usage\nOnce installed (see below), timing information will be submitted from browsers\nvia AJAX, back to the mounted engine, and passed to any configured recorders.\n\nRecorders can be any callable object, and can be configured like so:\n\n```ruby\nNdrBrowserTimings.recorders \u003c\u003c -\u003e(timing) { MyService.notify(timing) }\n```\n\nThis gem bundles some recorders:\n\n```ruby\n# Send info to the Rails log:\nrequire 'ndr_browser_timings/recorders/logger'\nNdrBrowserTimings.recorders \u003c\u003c NdrBrowserTimings::Recorders::Logger.new\n\n# Send info to prometheus:\nrequire 'ndr_browser_timings/recorders/ndr_stats'\nNdrStats.configure(...)\nNdrBrowserTimings.recorders \u003c\u003c NdrBrowserTimings::Recorders::NdrStats.new\n```\n\n## Installation\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'ndr_browser_timings'\n```\n\nAnd then execute:\n```bash\n$ bundle\n```\n\nOr install it yourself as:\n```bash\n$ gem install ndr_browser_timings\n```\n\nInject the client library into pages you want timings submitted from:\n\n```javascript\n//=require 'ndr_browser_timings/ndr_browser_timings'\n```\n\nand the `\u003cmeta\u003e` tag to provide configuration to the client library:\n\n```ruby\n\u003c%= ndr_browser_timings_meta_tag %\u003e\n```\n\nBy default, all requests will be instrumented. You can alternatively elect to only\nsample a fraction of requests, to reduce data collected:\n\n```ruby\n\u003c%= ndr_browser_timings_meta_tag(sample_rate: 0.1) %\u003e\n```\n\nThis is an isolated engine, so you'll need to configure with an authentication check:\n\n```ruby\n# Allow all requests through (careful!):\nNdrBrowserTimings.check_current_user_authentication = -\u003e(request) { true }\n```\n\n## License\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\nEveryone interacting in the NdrBrowserTimings project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the `CODE_OF_CONDUCT.md`.\n\n## TODO:\n* javascript fallback\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhsdigital%2Fndr_browser_timings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnhsdigital%2Fndr_browser_timings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhsdigital%2Fndr_browser_timings/lists"}