EspressoSystems / EspressoSystems/surf-disco

Add `metrics` request type

Open
#46 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

We need a request type to match the new `METRICS` pseudo-method in Tide Disco. We can't just `get::` metrics, since they are returned in plain text, but `get` will try to parse a string from JSON or bincode.

We should define a trait `Metrics : tide_disco::Metrics` which adds an `import` method (opposite of `tide_disco::Metrics::export`) which parses a metrics object from a string. Implement this trait for `prometheus::Registry`. Define a `metrcs` request which returns `T`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating existing request types in surf-disco and read tide_disco::Metrics::export to understand the corresponding import behavior. Inspect prometheus::Registry parsing support, then define the Metrics trait and metrics request described in the issue. Done means plain-text METRICS responses can be imported into a Registry-backed type and returned through the request.

Written by the indexing model from the issue text.

Assessment

Tech stack
prometheus, rust
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.