tracer

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TracerStreamServerInterceptor

func TracerStreamServerInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (err error)

TracerStreamServerInterceptor will perform xray tracing for each stream RPC call

to pass in parent xray segment id and trace id, set the metadata keys with:

x-amzn-seg-id = parent xray segment id, assign value to this key via metadata.MD
x-amzn-tr-id = parent xray trace id, assign value to this key via metadata.MD

how to set metadata at client side?

ctx := context.Background()
md := metadata.Pairs("x-amzn-seg-id", "abc", "x-amzn-tr-id", "def")
ctx = metadata.NewOutgoingContext(ctx, md)

func TracerUnaryClientInterceptor added in v1.2.9

func TracerUnaryClientInterceptor(serviceName string) grpc.UnaryClientInterceptor

func TracerUnaryServerInterceptor

func TracerUnaryServerInterceptor(serviceName string) grpc.UnaryServerInterceptor

Types

This section is empty.

Jump to

Keyboard shortcuts

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