{"id":29584293,"url":"https://github.com/max-te/opentelemetry-openmetrics-text","last_synced_at":"2025-07-20T00:30:40.194Z","repository":{"id":303841105,"uuid":"1014304917","full_name":"max-te/opentelemetry-openmetrics-text","owner":"max-te","description":"Haphazard conversion of opentelemetry-rust metrics into openmetrics text format to replace opetelemetry-prometheus","archived":false,"fork":false,"pushed_at":"2025-07-19T19:10:48.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-19T20:01:06.321Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/max-te.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,"zenodo":null}},"created_at":"2025-07-05T13:01:13.000Z","updated_at":"2025-07-19T19:10:52.000Z","dependencies_parsed_at":"2025-07-10T01:50:44.305Z","dependency_job_id":"747bf3a0-aa31-4cb1-9e48-06275f8dbc83","html_url":"https://github.com/max-te/opentelemetry-openmetrics-text","commit_stats":null,"previous_names":["max-te/opentelemetry-openmetrics-text"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/max-te/opentelemetry-openmetrics-text","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max-te%2Fopentelemetry-openmetrics-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max-te%2Fopentelemetry-openmetrics-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max-te%2Fopentelemetry-openmetrics-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max-te%2Fopentelemetry-openmetrics-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/max-te","download_url":"https://codeload.github.com/max-te/opentelemetry-openmetrics-text/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max-te%2Fopentelemetry-openmetrics-text/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266048469,"owners_count":23868738,"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":[],"created_at":"2025-07-20T00:30:37.716Z","updated_at":"2025-07-20T00:30:40.126Z","avatar_url":"https://github.com/max-te.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opentelemetry-openmetrics\n\nA Rust library for exporting OpenTelemetry metrics in the OpenMetrics text format. This serves as a protobuf-free alternative to the discontinued `opentelemetry-prometheus` crate.\n\n\u003e ⚠️ **Warning:** This implementation is not fully spec-compliant for [OpenTelemetry-to-OpenMetrics conversion](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.45.0/specification/compatibility/prometheus_and_openmetrics.md). Some edge cases and complex metrics setups may not be handled correctly. This library is still in an experimental state.\n\n## Features\n\n- **Conversion** of `opentelemetry-sdk` metric data to OpenMetrics-compliant text.\n- **Ready-to-use Exporter** to output metrics in the OpenMetrics text format.\n\n\n## How to use\n\n```rust\nuse std::time::Duration;\nuse opentelemetry_openmetrics::exporter::OpenMetricsExporter;\nuse opentelemetry_sdk::metrics::PeriodicReader;\nuse opentelemetry_sdk::metrics::SdkMeterProvider;\n\npub fn init_openmetrics_exporter() -\u003e OpenMetricsExporter {\n    let exporter = OpenMetricsExporter::new();\n    let reader = PeriodicReader::builder(exporter.clone())\n        .with_interval(Duration::from_secs(1))\n        .build();\n    let meter_provider = SdkMeterProvider::builder()\n        .with_reader(reader)\n        .build();\n    opentelemetry::global::set_meter_provider(meter_provider);\n    exporter\n}\n\nlet exporter = init_openmetrics_exporter();\n// Retain the exporter.\n// Register and fill some meters.\n\n// Later read the current metrics:\nlet openmetrics = exporter.text().await;\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmax-te%2Fopentelemetry-openmetrics-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmax-te%2Fopentelemetry-openmetrics-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmax-te%2Fopentelemetry-openmetrics-text/lists"}