tracing

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithStreamClient

func WithStreamClient(opts ...Option) grpc.DialOption

WithStreamClient 客户端流操作追踪

func WithStreamServer

func WithStreamServer(opts ...Option) grpc.ServerOption

WithStreamServer 服务端流操作追踪

func WithUnaryClient

func WithUnaryClient(opts ...Option) grpc.DialOption

WithUnaryClient 客户端普通方法调用追踪

func WithUnaryServer

func WithUnaryServer(opts ...Option) grpc.ServerOption

WithUnaryServer 服务端普通方法响应追踪

Types

type OperationName

type OperationName func(ctx context.Context, method string) string

type Option

type Option struct {
	grpc.EmptyCallOption
	// contains filtered or unexported fields
}

func Disable

func Disable() Option

Disable 禁用追踪

func Enable

func Enable() Option

Enable 启用追踪

func WithOperationName

func WithOperationName(h OperationName) Option

WithOperationName 设置操作名称

func WithPayload

func WithPayload(payload bool) Option

WithPayload 对于普通方法,用于设置是否需要记录请求头、请求参数及响应数据信息;对于流,用于设置建立流时是否需要记录请求头信息;

func WithPayloadMarshal

func WithPayloadMarshal(h PayloadMarshal) Option

WithPayloadMarshal 设置请求参数及响应数据的序列化方式

func WithStreamPayload

func WithStreamPayload(payload bool) Option

WithStreamPayload 设置是否需要记录流的发送和接收数据信息,只作用于流操作

func WithTracer

func WithTracer(tracer opentracing.Tracer) Option

WithTracer 设置追踪组件

type PayloadMarshal

type PayloadMarshal func(m interface{}) interface{}

Jump to

Keyboard shortcuts

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