{"id":15687330,"url":"https://github.com/mre/beacon","last_synced_at":"2025-05-07T19:41:59.555Z","repository":{"id":23153065,"uuid":"26508489","full_name":"mre/beacon","owner":"mre","description":"A dedicated endpoint for real user monitoring. Works with boomerang, statsc and others.","archived":false,"fork":false,"pushed_at":"2015-08-17T14:32:28.000Z","size":458,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T13:27:46.537Z","etag":null,"topics":["beacon","boomerang","javascript","monitoring","performance","php","statsd"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-11T22:45:47.000Z","updated_at":"2022-12-30T14:01:04.000Z","dependencies_parsed_at":"2022-08-21T20:31:03.332Z","dependency_job_id":null,"html_url":"https://github.com/mre/beacon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mre%2Fbeacon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mre%2Fbeacon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mre%2Fbeacon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mre%2Fbeacon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mre","download_url":"https://codeload.github.com/mre/beacon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252945716,"owners_count":21829639,"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":["beacon","boomerang","javascript","monitoring","performance","php","statsd"],"created_at":"2024-10-03T17:47:21.736Z","updated_at":"2025-05-07T19:41:59.536Z","avatar_url":"https://github.com/mre.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![beacon](beacon.png)\n\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mre/beacon/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mre/beacon/?branch=master)\n[![Build Status](https://scrutinizer-ci.com/g/mre/beacon/badges/build.png?b=master)](https://scrutinizer-ci.com/g/mre/beacon/build-status/master)\n[![Code Coverage](https://scrutinizer-ci.com/g/mre/beacon/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/mre/beacon/?branch=master)\n\nA dedicated endpoint for real user monitoring. A beacon backend for your application.  \nWorks with [boomerang](https://github.com/lognormal/boomerang) and [statsc](https://github.com/godmodelabs/statsc).  \n\n### Usage\n\nFrom your application, you can send `GET` requests to the beacon endpoint like so:  \n`http://example.com/my/applicationname?redirect=619ms\u0026cache=4ms\u0026dns=0ms\u0026connect=1ms\u0026firstByte=715ms\u0026items=30g`\n\nThis will send the following metrics via [statsd](https://github.com/etsy/statsd/) for further processing:\n\n```\nmy.applicationname.redirect:619|ms\nmy.applicationname.cache:4|ms\nmy.applicationname.dns:0|ms\nmy.applicationname.connect:1|ms\nmy.applicationname.firstByte:715|ms\nmy.applicationname.items:30|g\n```\n\nBeacon is used with a time-series database like this:\n\n```\nclient --\u003e beacon --\u003e statsd --\u003e graphite/influxdb/opentsdb/...\n```\n\nWe've included a `docker-compose.yml` file to try this out.\n\n\n### Quick start with Docker\n\n    docker build -t mre/beacon .\n    docker run -it --rm -p 80:80 mre/beacon\n\n\n### Manual Installation\n\nRunning this with Docker as shown above is the preferred method, but if you  \nhave to install it locally, here's how to do it:\n\n1. Run `composer install`\n2. Start a server with this directory as a document root.  \n   For testing, you can use the builtin PHP webserver:\n   `php -S 0.0.0.0:8000`\n3. (Optional) For beatiful URLs, enable rewrite rules and put a `.htaccess`  \n   file into that folder with the following entry:\n   `RewriteRule ^(.*)$ index.php?handler=$1 [L,QSA]`\n\n\n### Valid keys:\n\nKeys consist of upper and lowercase separated by dots or underscores.  \nExamples: foo, FOO, FOO_BAR, FOO.BAR, FOO.bar, foo.BAR, foo.bar.baz, foo.bar_baz\n\n### Valid types:\n\nAll statsd datatypes are supported. Those are:\n\nName         | Long name | Usage                                              |\n------------ |-----------|----------------------------------------------------|\nc            | Counter   | A record of an event occuring                      |\ng            | Gauge     | A snapshot value of a variable                     |\nms           | Time      | A record of how long an event took, in milliseconds|\ns            | Set       | Unique occurences of events between flushes        |\n\nFor more info, see [the official statsd documentation](https://github.com/etsy/statsd/blob/master/docs/metric_types.md).\n\n\n### Valid values:\n\nValues are negative or positive int or float numbers.\nExamples: 123, -123, 1.0, -1.0\n\n\n### Credits\n\nBeacon logo created by [Ahmed Elzahra](https://www.behance.net/ahmedelzahra) from the Noun Project. Thanks!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmre%2Fbeacon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmre%2Fbeacon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmre%2Fbeacon/lists"}