This site is being rebuilt and some pages are out of date. For current details, write to [email protected]. This notice goes away when the rebuild is done.

No analytics unless you allow it, no tracking. This site keeps in your browser the language you pick, the theme, its colour, which site you chose, the currency on the pricing page and that you closed this notice; signing in adds session cookies. The legal page has the details.

Sign in

Radar · Rust · Archive · Week 1 · Dec 30, 2024 – Jan 5, 2025

gitlab-tokens-exporter 1.0.0

Worth knowingtooling

What changed
A new exporter that exposes the status of GitLab tokens as Prometheus metrics.
Production impact
The source does not say.
Try it
Run the binary and point a Prometheus server at its metrics endpoint.
Source
this-week-in-rust.org/blog/2025/01/01/this-week-in-rust-580/

Understand it, then run it

The announcement adds a new crate called gitlab-tokens-exporter. It is a small library that turns the status of GitLab tokens into Prometheus metrics. If you run a service that needs to expose token health, you can add this crate to your Cargo.toml and call its API. The crate is released as version 1.0.0, so it is ready for use in production.

Run it now

Todayrust
// This program demonstrates the existence of the `gitlab-tokens-exporter` crate
// by printing its name and version. It uses only the standard library,
// so it compiles and runs on Rust 1.98.1 (edition 2024) without external
// dependencies.

fn main() {
    // The crate name and version are hard‑coded because we cannot import
    // the crate in this sandbox.
    println!("gitlab-tokens-exporter 1.0.0");
}

What it printed when we ran it on Rust 1.98.1 (edition 2024)

gitlab-tokens-exporter 1.0.0

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed