https://github.com/hawkw/tinymetrics Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + For + Enterprise + Teams + Startups + Education + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} hawkw / tinymetrics Public * Notifications * Fork 1 * Star 38 a minimal, allocation-free Prometheus/OpenMetrics metrics implementation for `no-std` and embedded Rust. 38 stars 1 fork Star Notifications * Code * Issues 1 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights hawkw/tinymetrics This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 0 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/h] Use Git or checkout with SVN using the web URL. [gh repo clone hawkw/] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @hawkw hawkw feat(timestamp): add optional timestamp support ... a5dce67 Mar 4, 2023 feat(timestamp): add optional timestamp support a5dce67 Git stats * 11 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows src .envrc .gitignore Cargo.toml README.md flake.lock flake.nix View code tinymetrics why should you use it? README.md tinymetrics a minimal, allocation-free Prometheus/OpenMetrics metrics implementation for no-std and embedded projects. why should you use it? you may want to use this crate if: 1. you want the Prometheus/OpenMetrics text exposition format. other metrics systems are not supported. if you want a generic way to record metrics that can be emitted in a number of different formats, the i highly recommend the metrics crate and its ecosystem, which provide a generic facade implementation that can be used with multiple metrics systems. however, these libraries may be less suitable for use in embedded systems -- read on for why. 2. you can't (or don't want to) allocate memory dynamically. this crate is intended to allow all metrics storage to be declared in statics, for use in embedded systems and other no-std use-cases. in order to support completely static usage, this crate has some additional limitations over other Prometheus/OpenMetrics implementations. in particular: 3. the cardinality of metrics labels is known ahead of time. because tinymetrics stores metrics in static, fixed-size arrays, the maximum size of the label set of each metric must be declared at compile time. this is an inherent limitation to using static storage, but it may be acceptable if you only want to expose a small number of metrics with known labels. 4. you only need counter and gauge metrics. i haven't implemented the summary and histogram metric types yet, although it would be nice to eventually. About a minimal, allocation-free Prometheus/OpenMetrics metrics implementation for `no-std` and embedded Rust. Resources Readme Stars 38 stars Watchers 1 watching Forks 1 fork Releases No releases published Packages 0 No packages published Languages * Rust 98.5% * Nix 1.5% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.