{"id":15067631,"url":"https://github.com/ispringle/openmetrics-rs","last_synced_at":"2025-07-06T23:07:01.362Z","repository":{"id":43338008,"uuid":"243590450","full_name":"ispringle/openmetrics-rs","owner":"ispringle","description":"An OpenMetrics (Prometheus Metrics) Parser in Rust","archived":false,"fork":false,"pushed_at":"2023-06-22T17:44:48.000Z","size":23,"stargazers_count":4,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-03T20:04:28.428Z","etag":null,"topics":["hacktoberfest","hacktoberfest2020","openmetrics","prometheus","prometheus-metrics","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/ispringle.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":"2020-02-27T18:40:48.000Z","updated_at":"2024-12-24T10:34:29.000Z","dependencies_parsed_at":"2024-09-25T01:25:30.307Z","dependency_job_id":"309a7fba-2849-40c7-8b54-4332a68779f5","html_url":"https://github.com/ispringle/openmetrics-rs","commit_stats":null,"previous_names":["pard68/openmetrics-rs"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ispringle/openmetrics-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispringle%2Fopenmetrics-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispringle%2Fopenmetrics-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispringle%2Fopenmetrics-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispringle%2Fopenmetrics-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ispringle","download_url":"https://codeload.github.com/ispringle/openmetrics-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispringle%2Fopenmetrics-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263395044,"owners_count":23459970,"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":["hacktoberfest","hacktoberfest2020","openmetrics","prometheus","prometheus-metrics","rust"],"created_at":"2024-09-25T01:25:25.317Z","updated_at":"2025-07-06T23:07:01.339Z","avatar_url":"https://github.com/ispringle.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenMetrics-rs\n![Rust](https://github.com/pard68/openmetrics-rs/workflows/Rust/badge.svg?branch=master\u0026event=push)\n[![Docs](https://docs.rs/openmetrics/badge.svg)](https://docs.rs/openmetrics)\n[![Crates.io](https://img.shields.io/crates/v/openmetrics)](https://crates.io/crates/openmetrics)\n\nAn OpenMetrics parser in Rust 🦀\n\n## Example\n\n```rust\nextern crate openmetrics;\nuse std::fs;\n\nfn main() {\n    let unparsed_file = fs::read_to_string(\"test.prom\").expect(\"cannot read file!\");\n    openmetrics::parse_metrics(unparsed_file);\n}\n```\n\nSample metrics data:\n```shell\n{\n    \"go_goroutines\": MetricGroup {\n        help: \"Number of goroutines that currently exist.\",\n        type: GAUGE,\n        metric: Metric(\n            [\n                {\n                    \"value\": \"9\",\n                },\n            ],\n        ),\n    },\n}\n```\n\n# TODO\n- [X] bin -\u003e lib\n- [ ] consume URLs\n- [ ] consume specific file\n- [ ] methods to specify specific alternative output (JSON/YAML/TOML/string/etc)\n- [X] Add label and metric logic to convert parsed pest data into usable data\n- [ ] parse labels within each metricLine\n- [ ] reconsider best way to handle labels and special labels (such as quartile)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fispringle%2Fopenmetrics-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fispringle%2Fopenmetrics-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fispringle%2Fopenmetrics-rs/lists"}