telemetry
v1.85.0
google.golang.org/grpc/experimental/stats/telemetry
Documentation
pkg.go.dev ↗Package telemetry defines stats APIs for interacting with telemetry labels.
Experimental
Notice: All APIs in this package are experimental and may be changed or removed in a later release.
Functions
NewContextWithLabelCallback
func NewContextWithLabelCallback(ctx context.Context, callback stats.LabelCallback) context.Context
NewContextWithLabelCallback registers a callback function that is executed whenever telemetry labels are updated. This does _not_ require opentelemetry instrumentation to be configured on the client or server.
WARNING: Callbacks are executed on the RPC path so users should be mindful of the potential performance impact when this is eventually executed.