package telemetry
import "cuelang.org/go/internal/golangorgx/gopls/telemetry"
Index ¶
- func AddForwardedCounters(names []string, values []int64)
- func CounterOpen()
- func CrashMonitorSupported() bool
- func ForEachLatencyCounter(operation string, isError bool, f func(*counter.Counter))
- func Mode() string
- func NewStackCounter(name string, depth int) *counter.StackCounter
- func RecordClientInfo(clientName string)
- func RecordViewGoVersion(x int)
- func SetMode(mode string) error
- func StartCrashMonitor()
- func StartLatencyTimer(operation string) func(context.Context, error)
- func Upload()
Functions ¶
func AddForwardedCounters ¶
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 ¶
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 ¶
SetMode calls x/telemetry.SetMode.
func StartCrashMonitor ¶
func StartCrashMonitor()
StartCrashMonitor calls crashmonitor.Start.
func StartLatencyTimer ¶
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.
Source Files ¶
latency.go telemetry.go
- Version
- v0.12.0 (latest)
- Published
- Jan 30, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 8 hours ago –
Tools for package owners.