Esempio n. 1
0
func (g *ChanGroup) Sample(ctx slog.Context) {
	ctx.Add("source", g.Name)
	for i := 0; i < numSeries; i++ {
		// TODO: If we set the ChanGroup.Name to be the hostname, this might need to change.
		ctx.Sample(fmt.Sprintf("points.%s.pending", seriesNames[i]), len(g.points[i]))
	}
}
Esempio n. 2
0
func main() {
	ctx := slog.Context{}
	ctx.Add("fixture", true)
	fmt.Println(ctx)
}
Esempio n. 3
0
func LogWithContext(ctx slog.Context) {
	ctx.Add("app", "lumbermill")
	log.Println(ctx)
}