telemetry

package
v0.8.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddForwardedCounters

func AddForwardedCounters(names []string, values []int64)

AddForwardedCounters adds the given counters on behalf of clients. Names and values must have the same length.

func CounterOpen

func CounterOpen()

CounterOpen calls counter.Open.

func CrashMonitorSupported

func CrashMonitorSupported() bool

CrashMonitorSupported calls crashmonitor.Supported.

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 Mode

func Mode() string

Mode calls x/telemetry.Mode.

func NewStackCounter

func NewStackCounter(name string, depth int) *counter.StackCounter

NewStackCounter calls counter.NewStack.

func RecordClientInfo

func RecordClientInfo(clientName string)

RecordClientInfo records gopls client info.

func RecordViewGoVersion

func RecordViewGoVersion(x int)

RecordViewGoVersion records the Go minor version number (1.x) used for a view.

func SetMode

func SetMode(mode string) error

SetMode calls x/telemetry.SetMode.

func StartCrashMonitor

func StartCrashMonitor()

StartCrashMonitor calls crashmonitor.Start.

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 the resulting func is done, no observation is recorded.

func Upload

func Upload()

Upload starts a goroutine for telemetry upload.

Types

This section is empty.

Jump to

Keyboard shortcuts

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