{"id":13478730,"url":"https://github.com/metrics-rs/metrics","last_synced_at":"2025-05-12T09:22:39.225Z","repository":{"id":38183702,"uuid":"177049645","full_name":"metrics-rs/metrics","owner":"metrics-rs","description":"A metrics ecosystem for Rust.","archived":false,"fork":false,"pushed_at":"2025-05-08T12:21:44.000Z","size":1989,"stargazers_count":1269,"open_issues_count":50,"forks_count":180,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-05-12T02:51:51.193Z","etag":null,"topics":["metrics","rust-lang","telemetry"],"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/metrics-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-03-22T01:20:13.000Z","updated_at":"2025-05-11T21:17:29.000Z","dependencies_parsed_at":"2023-10-05T05:55:52.062Z","dependency_job_id":"fed06ead-2b5f-422c-8024-6e45df48c26e","html_url":"https://github.com/metrics-rs/metrics","commit_stats":{"total_commits":678,"total_committers":81,"mean_commits":8.37037037037037,"dds":0.3141592920353983,"last_synced_commit":"d97f80146b0f5e0ea4f8f0809fdfa76bb49357f5"},"previous_names":[],"tags_count":193,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrics-rs%2Fmetrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrics-rs%2Fmetrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrics-rs%2Fmetrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrics-rs%2Fmetrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metrics-rs","download_url":"https://codeload.github.com/metrics-rs/metrics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253708831,"owners_count":21951059,"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","rust-lang","telemetry"],"created_at":"2024-07-31T16:02:01.765Z","updated_at":"2025-05-12T09:22:39.170Z","avatar_url":"https://github.com/metrics-rs.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"![Metrics - High-performance, protocol-agnostic instrumentation][splash]\n\n[splash]: https://raw.githubusercontent.com/metrics-rs/metrics/main/assets/splash.png\n\n[![Code of Conduct][conduct-badge]][conduct]\n[![MIT licensed][license-badge]](#license)\n[![Documentation][docs-badge]][docs]\n[![Discord chat][discord-badge]][discord_invite]\n![last-commit-badge][]\n![contributors-badge][]\n\n[conduct-badge]: https://img.shields.io/badge/%E2%9D%A4-code%20of%20conduct-blue.svg\n[conduct]: https://github.com/metrics-rs/metrics/blob/master/CODE_OF_CONDUCT.md\n[license-badge]: https://img.shields.io/badge/license-MIT-blue\n[docs-badge]: https://docs.rs/metrics/badge.svg\n[docs]: https://docs.rs/metrics\n[discord-badge]: https://img.shields.io/discord/500028886025895936\n[last-commit-badge]: https://img.shields.io/github/last-commit/metrics-rs/metrics\n[contributors-badge]: https://img.shields.io/github/contributors/metrics-rs/metrics\n\n\n## code of conduct\n\n**NOTE**: All conversations and contributions to this project shall adhere to the [Code of Conduct][conduct].\n\n# what's it all about?\n\nRunning applications in production can be hard when you don't have insight into what the application is doing.  We're lucky to have so many good system monitoring programs and services to show us how our servers are performing, but we still have to do the work of instrumenting our applications to gain deep insight into their behavior and performance.\n\n`metrics` makes it easy to instrument your application to provide real-time insight into what's happening.  It provides a number of practical features that make it easy for library and application authors to start collecting and exporting metrics from their codebase.\n\n# why would I collect metrics?\n\nSome of the most common scenarios for collecting metrics from an application:\n- see how many times a codepath was hit\n- track the time it takes for a piece of code to execute\n- expose internal counters and values in a standardized way\n\nImportantly, this works for both library authors and application authors.  If the libraries you use are instrumented, you unlock the power of being able to collect those metrics in your application for free, without any extra configuration.  Everyone wins, and learns more about their application performance at the end of the day.\n\n# project layout\n\nThe Metrics project provides a number of crates for both library and application authors.\n\nIf you're a library author, you'll only care about using [`metrics`][metrics] to instrument your library.  If you're an application author, you'll likely also want to instrument your application, but you'll care about \"exporters\" as a means to take those metrics and ship them somewhere for analysis.\n\nOverall, this repository is home to the following crates:\n\n* [`metrics`][metrics]: A lightweight metrics facade, similar to [`log`][log].\n* [`metrics-tracing-context`][metrics-tracing-context]: Allow capturing [`tracing`][tracing] span\n  fields as metric labels.\n* [`metrics-exporter-tcp`][metrics-exporter-tcp]: A `metrics`-compatible exporter for serving metrics over TCP.\n* [`metrics-exporter-prometheus`][metrics-exporter-prometheus]: A `metrics`-compatible exporter for\n  serving a Prometheus scrape endpoint.\n* [`metrics-util`][metrics-util]: Helper types/functions used by the `metrics` ecosystem.\n\n# community integrations and learning resources\n\nAs well, there are also some community-maintained exporters and other integrations:\n\n* [`metrics-exporter-statsd`][metrics-exporter-statsd]: A `metrics`-compatible exporter for sending metrics via StatsD.\n* [`metrics-exporter-newrelic`][metrics-exporter-newrelic]: A `metrics`-compatible exporter for sending metrics to New Relic.\n* [`metrics-exporter-sentry`][metrics-exporter-sentry]: A `metrics`-compatible exporter for sending metrics to Sentry.\n* [`opinionated_metrics`][opinionated-metrics]: Opinionated interface to emitting metrics for CLI/server applications, based on `metrics`.\n* [`metrics-dashboard`][metrics-dashboard]: A dashboard for visualizing metrics from `metrics`.\n* [`actix-web-metrics`][actix-web-metrics]: `metrics` integration for actix-web.\n\nAdditionally, here are some learning resource(s) to help you get started:\n\n* [Rust Telemetry Workshop][rust-telemetry-workshop] from [MainMatter](https://mainmatter.com/) (includes more than just `metrics`, as well).\n\n## MSRV and MSRV policy\n\nMinimum supported Rust version (MSRV) is currently **1.71.1**, enforced by CI.\n\n`metrics` will always support _at least_ the latest four versions of stable Rust, based on minor\nversion releases, and excluding patch versions. Overall, we strive to support older versions where\npossible, which means that we generally try to avoid staying up-to-date with every single dependency\n(except for security/correctness reasons) and avoid bumping the MSRV just to get access to new\nhelper methods in the standard library, and so on.\n\n# contributing\n\nTo those of you who have already contributed to `metrics` in some way, shape, or form: **a big, and continued, \"thank you!\"** ❤️\n\nTo everyone else that we haven't had the pleasure of interacting with: we're always looking for thoughts on how to make `metrics` better, or users with interesting use cases.  Of course, we're also happy to accept code contributions for outstanding feature requests directly. 😀\n\nWe'd love to chat about any of the above, or anything else related to metrics. Don't hesitate to file an issue on the repository, or come and chat with us over on [Discord][discord_invite].\n\n[metrics]: https://github.com/metrics-rs/metrics/tree/main/metrics\n[metrics-tracing-context]: https://github.com/metrics-rs/metrics/tree/main/metrics-tracing-context\n[metrics-exporter-tcp]: https://github.com/metrics-rs/metrics/tree/main/metrics-exporter-tcp\n[metrics-exporter-prometheus]: https://github.com/metrics-rs/metrics/tree/main/metrics-exporter-prometheus\n[metrics-util]: https://github.com/metrics-rs/metrics/tree/main/metrics-util\n[log]: https://docs.rs/log\n[tracing]: https://tracing.rs\n[metrics-exporter-statsd]: https://docs.rs/metrics-exporter-statsd\n[metrics-exporter-newrelic]: https://docs.rs/metrics-exporter-newrelic\n[metrics-exporter-sentry]: https://docs.rs/metrics-exporter-sentry\n[opinionated-metrics]: https://docs.rs/opinionated_metrics\n[metrics-dashboard]: https://docs.rs/metrics-dashboard\n[rust-telemetry-workshop]: https://github.com/mainmatter/rust-telemetry-workshop\n[discord_invite]: https://discord.gg/tokio\n[actix-web-metrics]: https://docs.rs/actix-web-metrics\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrics-rs%2Fmetrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetrics-rs%2Fmetrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrics-rs%2Fmetrics/lists"}