logging

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamServerInterceptor

func StreamServerInterceptor(fields ...FieldSpec) grpc.StreamServerInterceptor

StreamServerInterceptor creates an interceptor for extracting fields from requests and setting them as log tags.

func UnaryServerInterceptor

func UnaryServerInterceptor(fields ...FieldSpec) grpc.UnaryServerInterceptor

UnaryServerInterceptor creates an interceptor for extracting fields from requests and setting them as log tags.

Types

type FieldSpec

type FieldSpec struct {
	// contains filtered or unexported fields
}

FieldSpec provides a mapping between a metadata context field and a logging field.

func ExtractMetadataField

func ExtractMetadataField(metadataKey, tagKey string) FieldSpec

ExtractMetadataField creates a specification for converting gRPC metadata fields to log tags.

Jump to

Keyboard shortcuts

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