GithubHelp home page GithubHelp logo

rust-prometheus-tokio's Introduction

Prometheus + Tokio

This project exposes a Tokio collector that is compatible with the prometheus crate that adds tokio runtime related metrics.

The project relies on a tokio_unstable feature, so you need to add the flags accordingly, e.g. by adding a .cargo/config.toml file to your project with the correct RUSTFLAGS, as is done here.

You can quickly test to look at the metrics that exist by using the example app:

cargo run --example complete-setup
# In another terminal
curl 127.0.0.1/metrics

Forced feature

Due to feature unification, note that bringing this crate in your project will force the rt feature of tokio in your project. This should not be an issue, given that runtime metrics hopefully make little sense if there is no runtime to measure.

Features

The crate has a single feature:

  • io_driver enables the tokio/net feature, and adds an extra metric that reports the number of ready events processed by the runtime’s I/O driver.

Acknowledgement

The project was kickstarted by Fiberplane during a "Hack day".

rust-prometheus-tokio's People

Contributors

gagbo avatar

Stargazers

LrWm avatar folex avatar Micha Hernandez van Leuffen avatar  avatar

Watchers

 avatar  avatar

rust-prometheus-tokio's Issues

Add example app

Having an example app is the best way to test the design is sound, and that everything works

Remove `tokio_metrics` ??

Since we are calling the collection manually through the Collector trait, maybe we can remove the tokio_metrics middleware and directly poll and use tokio::RuntimeMetrics, by having our own min_max_sum function ?

Question, possible to combine this with 'gstreamer-tokio'

https://github.com/standard-ai/tracing-gstreamer

Hello. I don't know rust or tokio very well, but I use gstreamer a lot. I was wondering if you thought it might be feasible to combine this project with the one I linked above.

My goal is to collect latency, data rate and buffers per second coming into and leaving each gstreamer element in a prometheus format.

I am merely curious if you think it is possible or if it would make sense at all. I will attempt it myself if you do.

Or if you would like to do so as a contractor I could look into hiring you for undertaking this work.

Please close upon reading.

Best regards!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.