We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Introducing rust-prometheus

Formale Metadaten

Titel
Introducing rust-prometheus
Untertitel
How Rust makes metrics safe and fast
Serientitel
Anzahl der Teile
561
Autor
Lizenz
CC-Namensnennung 2.0 Belgien:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
This talk is to give a brief introduction to the rust-prometheus library, which is a Rust client for Prometheus, a monitoring and alerting toolkit. After a brief look at basic usage, this talk will dive into how Rust features make the library safe and fast. Finally, we will discuss some ways to use Procedural Macros to reduce metric lookup by over 10x via generated static lookups. Intended audience: Rust beginner Agenda Introduction (5 min) Self introduction What is Rust-Prometheus: A brief introduction to Prometheus and the client library How to use: A short example of using the library to collect different kind of metrics How Rust Shines Safe (5 min) Why we care about safety Type-safe generic labels: Use generic label length so that label length can be checked at compile time. Rust’s Send & Sync markers Rust’s #[must_use] attribute Fast (5 min) Why we care about performance Local !Sync metrics: Shared global metrics across threads is not efficient, e.g. causing cache eviction. Local metrics to solve under the cost of normal variables! Static metric vectors via proc_macros: A macro to provide efficient metric vectors. How static metric macro is implemented (10 min) A small explanation of the macro implementation so that listeners will have a blueprint about the capability and the approach of Rust procedural macros. Benchmarks showing speed difference. Future Plan (2 min) Thread-local metrics: Enables seamlessly local metrics and less contention More metrics, like Prometheus Summary A more consistent API Metrics pulling Contributions are welcome! Production Use Case (5 min)