{"id":22072546,"url":"https://github.com/broxus/pomfrit","last_synced_at":"2025-10-04T11:16:53.173Z","repository":{"id":51487985,"uuid":"436753128","full_name":"broxus/pomfrit","owner":"broxus","description":"A simple Prometheus metrics exporter with hot reload","archived":false,"fork":false,"pushed_at":"2022-10-17T18:30:04.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-18T11:25:08.598Z","etag":null,"topics":["metrics","prometheus","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/broxus.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}},"created_at":"2021-12-09T20:32:00.000Z","updated_at":"2023-07-25T14:52:22.000Z","dependencies_parsed_at":"2022-08-22T00:40:46.941Z","dependency_job_id":null,"html_url":"https://github.com/broxus/pomfrit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/broxus/pomfrit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broxus%2Fpomfrit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broxus%2Fpomfrit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broxus%2Fpomfrit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broxus%2Fpomfrit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/broxus","download_url":"https://codeload.github.com/broxus/pomfrit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broxus%2Fpomfrit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278302576,"owners_count":25964530,"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-04T02:00:05.491Z","response_time":63,"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":["metrics","prometheus","rust"],"created_at":"2024-11-30T21:13:38.510Z","updated_at":"2025-10-04T11:16:53.146Z","avatar_url":"https://github.com/broxus.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## pomfrit\n\nPrometheus metrics exporter with hot reload\n\n### Example:\n```rust\nuse pomfrit::formatter::*;\n\n/// Your metrics as a struct\nstruct MyMetrics\u003c'a\u003e {\n    ctx: \u0026'a str,\n    some_diff: u32,\n    some_time: u32,\n}\n\n/// Describe how your metrics will be displayed\nimpl std::fmt::Display for MyMetrics\u003c'_\u003e {\n    fn fmt(\u0026self, f: \u0026mut std::fmt::Formatter\u003c'_\u003e) -\u003e std::fmt::Result {\n        f.begin_metric(\"some_diff\")\n            .label(\"label1\", self.ctx)\n            .label(\"label2\", \"some value\")\n            .value(self.some_diff)?;\n\n        f.begin_metric(\"some_time\")\n            .label(\"label1\", self.ctx)\n            .value(self.some_time)\n    }\n}\n\nasync fn my_app() {\n    // Create inactive exporter\n    let (exporter, writer) = pomfrit::create_exporter(None).await.unwrap();\n\n    // Spawn task that will run in the background and write metrics\n    writer.spawn(|buf| {\n        buf.write(MyMetrics {\n            ctx: \"asd\",\n            some_diff: 123,\n            some_time: 456,\n        }).write(MyMetrics {\n            ctx: \"qwe\",\n            some_diff: 111,\n            some_time: 444,\n        });\n    });\n\n    // ...\n\n    // Reload exporter config\n    exporter.reload(Some(pomfrit::Config {\n        collection_interval_sec: 10,\n        ..Default::default()\n    })).await.unwrap();\n}\n```\n\n### Why is it called `pomfrit`?\n\nPomfrit is fried potatoes. Something very simple and you order it in addition to the main course.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbroxus%2Fpomfrit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbroxus%2Fpomfrit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbroxus%2Fpomfrit/lists"}