grpclog

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PROTOJSONMarshaller is the marshaller used for serializing protobuf
	// messages. If needed, this variable can be reassigned with a different
	// marshaller with the same Marshal() signature.
	PROTOJSONMarshaller = protojson.MarshalOptions{}
)

Functions

func StreamServerInterceptor

func StreamServerInterceptor(logger *logging.Logger) grpc.StreamServerInterceptor

StreamServerInterceptor returns a new streaming server interceptor for logging stream requests.

func TracingClientContext added in v0.0.5

func TracingClientContext(ctx context.Context, traceHeader string) context.Context

TracingClientContext gets the tracing id from the context or generates a new one and appends it to the outgoing context

func TracingContext added in v0.0.4

func TracingContext(ctx context.Context, traceHeader string) context.Context

TracingContext gets the tracing id from the context metadata or generates a new one and appends it to the context.

func TracingStreamClientInterceptor added in v0.0.5

func TracingStreamClientInterceptor(traceHeader string) grpc.StreamClientInterceptor

TracingStreamClientInterceptor appends the tracing header to the metadata.

func TracingUnaryClientInterceptor added in v0.0.5

func TracingUnaryClientInterceptor(traceHeader string) grpc.UnaryClientInterceptor

TracingUnaryClientInterceptor appends the tracing header to the metadata.

func UnaryServerInterceptor

func UnaryServerInterceptor(logger *logging.Logger) grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a new unary server interceptors for logging unary requests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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