Skip to content

Commit 6cc292c

Browse files
committed
Merge pull request #110 from fabxc/labelnames
Add constants for instance/address labels and hidden prefix.
2 parents 692492e + 37a1f3e commit 6cc292c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

model/labelname.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,26 @@ const (
2626
// timeseries.
2727
MetricNameLabel LabelName = "__name__"
2828

29+
// AddressLabel is the name of the label that holds the address of
30+
// a scrape target.
31+
AddressLabel LabelName = "__address__"
32+
2933
// ReservedLabelPrefix is a prefix which is not legal in user-supplied
3034
// label names.
3135
ReservedLabelPrefix = "__"
3236

37+
// HiddenLabelPrefix is a prefix which is legal in user-supplied label names
38+
// but will not appear in the eventual metrics.
39+
// Reserved labels may be excepted from that rule.
40+
HiddenLabelPrefix = "_"
41+
3342
// JobLabel is the label name indicating the job from which a timeseries
3443
// was scraped.
3544
JobLabel LabelName = "job"
3645

46+
// InstanceLabel is the label name used for the instance label.
47+
InstanceLabel LabelName = "instance"
48+
3749
// BucketLabel is used for the label that defines the upper bound of a
3850
// bucket of a histogram ("le" -> "less or equal").
3951
BucketLabel = "le"

0 commit comments

Comments
 (0)