telemetry

package
v0.19.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEachLatencyCounter

func ForEachLatencyCounter(operation string, isError bool, f func(*counter.Counter))

ForEachLatencyCounter runs the provided function for each current latency counter measuring the given operation.

Exported for testing.

func StartLatencyTimer

func StartLatencyTimer(operation string) func(context.Context, error)

StartLatencyTimer starts a timer for the gopls operation with the given name, and returns a func to stop the timer and record the latency sample.

If the context provided to the resulting func is done, no observation is recorded.

Types

type CounterPath added in v0.18.0

type CounterPath []string

A CounterPath represents the components of a telemetry counter name.

By convention, counter names follow the format path/to/counter:bucket. The CounterPath holds the '/'-separated components of this path, along with a final element representing the bucket.

CounterPaths may be used to build up counters incrementally, such as when a set of observed counters shared a common prefix, to be controlled by the caller.

func (CounterPath) FullName added in v0.18.0

func (p CounterPath) FullName() string

FullName returns the counter name for the receiver.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL