Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit e4d9ee5

Browse files
committed
Moved stale marker in a dedicated pkg
1 parent 2ce6cb6 commit e4d9ee5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

pkg/stale/stale.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Package stale handles the staleness process.
2+
//
3+
// TODO: migrate here more logic dedicated to this topic
4+
// from the remote write package.
5+
package stale
6+
7+
import "math"
8+
9+
// Marker is the Prometheus Remote Write special value for marking
10+
// a time series as stale.
11+
//
12+
// Check https://www.robustperception.io/staleness-and-promql and
13+
// https://prometheus.io/docs/prometheus/latest/querying/basics/#staleness
14+
// for details about the Prometheus staleness markers.
15+
//
16+
// The value is the same used by the Prometheus package.
17+
// https://pkg.go.dev/github.com/prometheus/prometheus/pkg/value#pkg-constants
18+
//
19+
//nolint:gochecknoglobals
20+
var Marker = math.Float64frombits(0x7ff0000000000002)

0 commit comments

Comments
 (0)