{"id":15788387,"url":"https://github.com/mevdschee/php-wamp-observer","last_synced_at":"2025-03-31T18:24:16.787Z","repository":{"id":257640242,"uuid":"858892063","full_name":"mevdschee/php-wamp-observer","owner":"mevdschee","description":"High frequency websocket (WAMP RPC) message logging in PHP and aggregating into metrics using Go","archived":false,"fork":false,"pushed_at":"2024-10-15T15:00:02.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-16T15:51:49.013Z","etag":null,"topics":["metrics","prometheus","wamp-protocol","websocket","websockets"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mevdschee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-17T17:59:14.000Z","updated_at":"2024-10-15T15:00:44.000Z","dependencies_parsed_at":"2024-10-16T15:50:31.324Z","dependency_job_id":null,"html_url":"https://github.com/mevdschee/php-wamp-observer","commit_stats":null,"previous_names":["mevdschee/php-wamp-observer"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mevdschee%2Fphp-wamp-observer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mevdschee%2Fphp-wamp-observer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mevdschee%2Fphp-wamp-observer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mevdschee%2Fphp-wamp-observer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mevdschee","download_url":"https://codeload.github.com/mevdschee/php-wamp-observer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246516035,"owners_count":20790164,"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":["metrics","prometheus","wamp-protocol","websocket","websockets"],"created_at":"2024-10-04T21:42:03.716Z","updated_at":"2025-03-31T18:24:16.760Z","avatar_url":"https://github.com/mevdschee.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-wamp-observer\n\nA code base to showcase high frequency websocket (WAMP RPC) message logging in PHP and aggregating into metrics using Go.\n\n### Requirements\n\n- PHP 8 or higher (see special PHP 5/7 compatible version)\n- Go 1.22 build environment\n\n### Usage\n\nTo run the server:\n\n    go run .\n\nIn bash run:\n\n    for run in {1..100}; do php writer.php \u0026 done\n\nAnd to stop:\n\n    killall php\n\nNow observe the metrics:\n\nhttp://localhost:8080/\n\nNB: The metrics are Prometheus compatible and follow the [OpenMetrics specification](https://github.com/OpenObservability/OpenMetrics/).\n\nThe metrics are also served in the Gob binary format on:\n\nhttp://localhost:9999/\n\nThis endpoint can be scraped by other tools such as [metrics-db-importer](https://github.com/mevdschee/metrics-db-importer) or [php-observability](https://github.com/mevdschee/php-observability) to aggregate the metrics of multiple nodes.\n\n### Example metrics\n\nHere is an example of published metrics:\n\n    # HELP wamp_in_errors_seconds A summary of the wamp in errors.\n    # TYPE wamp_in_errors_seconds summary\n    wamp_in_errors_seconds_count{message=\"hello1\"} 82\n    wamp_in_errors_seconds_sum{message=\"hello1\"} 0.752\n    wamp_in_errors_seconds_count{message=\"hello2\"} 97\n    wamp_in_errors_seconds_sum{message=\"hello2\"} 1.300\n    wamp_in_errors_seconds_count{message=\"hello3\"} 106\n    wamp_in_errors_seconds_sum{message=\"hello3\"} 1.307\n    wamp_in_errors_seconds_count{message=\"hello4\"} 91\n    wamp_in_errors_seconds_sum{message=\"hello4\"} 1.175\n    wamp_in_errors_seconds_count{message=\"hello5\"} 106\n    wamp_in_errors_seconds_sum{message=\"hello5\"} 1.636\n    wamp_in_errors_seconds_count{message=\"hello6\"} 95\n    wamp_in_errors_seconds_sum{message=\"hello6\"} 0.875\n    wamp_in_errors_seconds_count{message=\"hello7\"} 76\n    wamp_in_errors_seconds_sum{message=\"hello7\"} 0.652\n    wamp_in_errors_seconds_count{message=\"hello8\"} 95\n    wamp_in_errors_seconds_sum{message=\"hello8\"} 1.580\n    wamp_in_errors_seconds_count{message=\"hello9\"} 90\n    wamp_in_errors_seconds_sum{message=\"hello9\"} 0.855\n    # HELP wamp_in_errors_total_seconds A histogram of the wamp in errors.\n    # TYPE wamp_in_errors_total_seconds histogram\n    wamp_in_errors_total_seconds_bucket{le=\"0.005\"} 227\n    wamp_in_errors_total_seconds_bucket{le=\"0.01\"} 741\n    wamp_in_errors_total_seconds_bucket{le=\"0.025\"} 766\n    wamp_in_errors_total_seconds_bucket{le=\"0.05\"} 787\n    wamp_in_errors_total_seconds_bucket{le=\"0.1\"} 820\n    wamp_in_errors_total_seconds_bucket{le=\"0.25\"} 837\n    wamp_in_errors_total_seconds_bucket{le=\"0.5\"} 838\n    wamp_in_errors_total_seconds_bucket{le=\"1\"} 838\n    wamp_in_errors_total_seconds_bucket{le=\"2.5\"} 838\n    wamp_in_errors_total_seconds_bucket{le=\"5\"} 838\n    wamp_in_errors_total_seconds_bucket{le=\"10\"} 838\n    wamp_in_errors_total_seconds_bucket{le=\"+Inf\"} 838\n    wamp_in_errors_total_seconds_sum 10.133\n    wamp_in_errors_total_seconds_count 838\n    # HELP wamp_in_responses_seconds A summary of the wamp in responses.\n    # TYPE wamp_in_responses_seconds summary\n    wamp_in_responses_seconds_count{message=\"hello1\"} 9096\n    wamp_in_responses_seconds_sum{message=\"hello1\"} 140.204\n    wamp_in_responses_seconds_count{message=\"hello2\"} 8967\n    wamp_in_responses_seconds_sum{message=\"hello2\"} 140.017\n    wamp_in_responses_seconds_count{message=\"hello3\"} 9042\n    wamp_in_responses_seconds_sum{message=\"hello3\"} 138.221\n    wamp_in_responses_seconds_count{message=\"hello4\"} 9068\n    wamp_in_responses_seconds_sum{message=\"hello4\"} 138.337\n    wamp_in_responses_seconds_count{message=\"hello5\"} 9146\n    wamp_in_responses_seconds_sum{message=\"hello5\"} 140.650\n    wamp_in_responses_seconds_count{message=\"hello6\"} 8983\n    wamp_in_responses_seconds_sum{message=\"hello6\"} 139.571\n    wamp_in_responses_seconds_count{message=\"hello7\"} 9026\n    wamp_in_responses_seconds_sum{message=\"hello7\"} 142.527\n    wamp_in_responses_seconds_count{message=\"hello8\"} 9026\n    wamp_in_responses_seconds_sum{message=\"hello8\"} 138.335\n    wamp_in_responses_seconds_count{message=\"hello9\"} 8907\n    wamp_in_responses_seconds_sum{message=\"hello9\"} 130.873\n    # HELP wamp_in_responses_total_seconds A histogram of the wamp in responses.\n    # TYPE wamp_in_responses_total_seconds histogram\n    wamp_in_responses_total_seconds_bucket{le=\"0.005\"} 21483\n    wamp_in_responses_total_seconds_bucket{le=\"0.01\"} 69704\n    wamp_in_responses_total_seconds_bucket{le=\"0.025\"} 72428\n    wamp_in_responses_total_seconds_bucket{le=\"0.05\"} 74558\n    wamp_in_responses_total_seconds_bucket{le=\"0.1\"} 78781\n    wamp_in_responses_total_seconds_bucket{le=\"0.25\"} 80598\n    wamp_in_responses_total_seconds_bucket{le=\"0.5\"} 81261\n    wamp_in_responses_total_seconds_bucket{le=\"1\"} 81261\n    wamp_in_responses_total_seconds_bucket{le=\"2.5\"} 81261\n    wamp_in_responses_total_seconds_bucket{le=\"5\"} 81261\n    wamp_in_responses_total_seconds_bucket{le=\"10\"} 81261\n    wamp_in_responses_total_seconds_bucket{le=\"+Inf\"} 81261\n    wamp_in_responses_total_seconds_sum 1248.733\n    wamp_in_responses_total_seconds_count 81261\n    # HELP wamp_in_timeouts_seconds A summary of the wamp in timeouts.\n    # TYPE wamp_in_timeouts_seconds summary\n    wamp_in_timeouts_seconds_count{message=\"hello1\"} 1760\n    wamp_in_timeouts_seconds_sum{message=\"hello1\"} 527.778\n    wamp_in_timeouts_seconds_count{message=\"hello2\"} 1750\n    wamp_in_timeouts_seconds_sum{message=\"hello2\"} 525.126\n    wamp_in_timeouts_seconds_count{message=\"hello3\"} 1854\n    wamp_in_timeouts_seconds_sum{message=\"hello3\"} 556.331\n    wamp_in_timeouts_seconds_count{message=\"hello4\"} 1723\n    wamp_in_timeouts_seconds_sum{message=\"hello4\"} 516.831\n    wamp_in_timeouts_seconds_count{message=\"hello5\"} 1674\n    wamp_in_timeouts_seconds_sum{message=\"hello5\"} 502.152\n    wamp_in_timeouts_seconds_count{message=\"hello6\"} 1762\n    wamp_in_timeouts_seconds_sum{message=\"hello6\"} 528.338\n    wamp_in_timeouts_seconds_count{message=\"hello7\"} 1721\n    wamp_in_timeouts_seconds_sum{message=\"hello7\"} 516.419\n    wamp_in_timeouts_seconds_count{message=\"hello8\"} 1724\n    wamp_in_timeouts_seconds_sum{message=\"hello8\"} 517.313\n    wamp_in_timeouts_seconds_count{message=\"hello9\"} 1719\n    wamp_in_timeouts_seconds_sum{message=\"hello9\"} 515.787\n    # HELP wamp_in_timeouts_total_seconds A histogram of the wamp in timeouts.\n    # TYPE wamp_in_timeouts_total_seconds histogram\n    wamp_in_timeouts_total_seconds_bucket{le=\"0.005\"} 0\n    wamp_in_timeouts_total_seconds_bucket{le=\"0.01\"} 0\n    wamp_in_timeouts_total_seconds_bucket{le=\"0.025\"} 0\n    wamp_in_timeouts_total_seconds_bucket{le=\"0.05\"} 1\n    wamp_in_timeouts_total_seconds_bucket{le=\"0.1\"} 3\n    wamp_in_timeouts_total_seconds_bucket{le=\"0.25\"} 7\n    wamp_in_timeouts_total_seconds_bucket{le=\"0.5\"} 15687\n    wamp_in_timeouts_total_seconds_bucket{le=\"1\"} 15687\n    wamp_in_timeouts_total_seconds_bucket{le=\"2.5\"} 15687\n    wamp_in_timeouts_total_seconds_bucket{le=\"5\"} 15687\n    wamp_in_timeouts_total_seconds_bucket{le=\"10\"} 15687\n    wamp_in_timeouts_total_seconds_bucket{le=\"+Inf\"} 15687\n    wamp_in_timeouts_total_seconds_sum 4706.074\n    wamp_in_timeouts_total_seconds_count 15687\n\n\nEnjoy!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmevdschee%2Fphp-wamp-observer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmevdschee%2Fphp-wamp-observer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmevdschee%2Fphp-wamp-observer/lists"}