mirror of
https://github.com/golang/go
synced 2024-11-19 01:24:39 -07:00
64633d5e86
This is designed to provide a compatible API to opencensus libraries while we still cannot directly depend on it. Most of this will be deleted again when we move the code over into the sub-module. Change-Id: I42b561f4f403c18cd22fb909b037f584ea90ad1b Reviewed-on: https://go-review.googlesource.com/c/tools/+/183247 Run-TryBot: Ian Cottrell <iancottrell@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
34 lines
768 B
Go
34 lines
768 B
Go
// Copyright 2019 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Package telemetry provides the hooks and adapters to allow use of telemetry
|
|
// throughout gopls.
|
|
package telemetry
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"golang.org/x/tools/internal/lsp/telemetry/stats"
|
|
"golang.org/x/tools/internal/lsp/telemetry/tag"
|
|
)
|
|
|
|
var (
|
|
Handle = func(mux *http.ServeMux) {}
|
|
|
|
Started = stats.NullInt64Measure()
|
|
ReceivedBytes = stats.NullInt64Measure()
|
|
SentBytes = stats.NullInt64Measure()
|
|
Latency = stats.NullFloat64Measure()
|
|
|
|
KeyRPCID tag.Key
|
|
KeyMethod tag.Key
|
|
KeyStatus tag.Key
|
|
KeyRPCDirection tag.Key
|
|
)
|
|
|
|
const (
|
|
Inbound = "in"
|
|
Outbound = "out"
|
|
)
|