/
metric.go
29 lines (23 loc) · 1003 Bytes
/
metric.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package event
import (
"context"
)
// Record sends a label event to the exporter with the supplied tags.
func Record(ctx context.Context, tags ...Tag) context.Context {
return dispatch(ctx, makeEvent(RecordType, sTags{}, tags))
}
// Record1 sends a label event to the exporter with the supplied tags.
func Record1(ctx context.Context, t1 Tag) context.Context {
return dispatch(ctx, makeEvent(RecordType, sTags{t1}, nil))
}
// Record2 sends a label event to the exporter with the supplied tags.
func Record2(ctx context.Context, t1, t2 Tag) context.Context {
return dispatch(ctx, makeEvent(RecordType, sTags{t1, t2}, nil))
}
// Record3 sends a label event to the exporter with the supplied tags.
func Record3(ctx context.Context, t1, t2, t3 Tag) context.Context {
return dispatch(ctx, makeEvent(RecordType, sTags{t1, t2, t3}, nil))
}