Data model artifacts for Prometheus
Overall
score
93%
Evaluation — 93%
↑ 1.13xAgent success when using this tile
Builds a serialized gauge histogram metric payload from bucketed observations while retaining histogram-style bucket encoding.
request_latency, sample count 6, sample sum 12.5, zero count 1, positive span offset 0 width 2 and bucket deltas [2, 3], and a negative span offset -2 width 1 with delta [1], the emitted bytes decode to a metric flagged as gauge histogram that uses a histogram payload containing zero bucket count, positive cumulative counts [2, 5], negative cumulative counts [1], and the provided sum and count. @test5.5 and zero count 1.2 are provided, the payload encodes those float counters instead of integer counters while preserving gauge histogram type and bucket populations. @test1700000000000, value 0.34, and labels {"trace_id": "abcd"} is attached to the first positive bucket, the emitted payload keeps the gauge histogram type and includes that exemplar on the matching bucket entry. @testBucket populations use Deltas as integer increments per span bucket; when Counts are supplied, treat them as absolute float counts aligned to the same bucket order.
@generates
type BucketSpan struct {
Offset int32
Width uint32
Deltas []int64
Counts []float64
Exemplar *Exemplar
}
type Exemplar struct {
Value float64
TimestampMs int64
Labels map[string]string
}
type GaugeHistogramInput struct {
Name string
Help string
Unit string
Positive BucketSpan
Negative BucketSpan
ZeroCount float64
SampleCount float64
SampleSum float64
}
func BuildGaugeHistogramPayload(input GaugeHistogramInput) ([]byte, error)Provides Prometheus metric protobuf definitions for gauge histograms built on the histogram payload.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/golang-github-com-prometheus--client-modeldocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10