...

Package stats

import "google.golang.org/grpc/internal/stats"
Overview
Index

Overview ▾

Package stats provides internal stats related functionality.

func SetLabels

func SetLabels(ctx context.Context, labels *Labels) context.Context

SetLabels sets the Labels in the context.

type Labels

Labels are the labels for metrics.

type Labels struct {
    // TelemetryLabels are the telemetry labels to record.
    TelemetryLabels map[string]string
}

func GetLabels

func GetLabels(ctx context.Context) *Labels

GetLabels returns the Labels stored in the context, or nil if there is one.