Documentation
¶
Overview ¶
Package telemetrytest records what Chronicle's telemetry emits, for tests: a span recorder installed as the global tracer provider, and a go-utils metrics sink that remembers every series registered on it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Attr ¶
func Attr(s sdktrace.ReadOnlySpan, key string) (string, bool)
Attr returns the value of the attribute key on s as a string, and whether s has it.
func Leaks ¶
func Leaks(rec *tracetest.SpanRecorder, value string) []string
Leaks returns every place value appears in what the recorder saw: a span name, an attribute, an event name or attribute, or a status description. A test that feeds personal data through the code asserts this is empty.
func Named ¶
func Named(rec *tracetest.SpanRecorder, name string) []sdktrace.ReadOnlySpan
Named returns the ended spans called name, in the order they ended.
Types ¶
type Series ¶
type Series struct {
Name string
Kind string // counter or histogram
Labels map[string]string
Unit string
Buckets []float64
// contains filtered or unexported fields
}
Series is one metric series a component registered on a Sink.
type Sink ¶
type Sink struct {
*gometrics.MockMetrics
// contains filtered or unexported fields
}
Sink is a go-utils metrics.Metrics that remembers every counter and histogram registered on it, keyed by name and labels.