otelgrpc

package
v0.10.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAddress

func ExtractAddress(addr string) (host, port string)

func GetProtoSize

func GetProtoSize(p any) int

func ParseFullMethod

func ParseFullMethod(fullMethod string) []attribute.KeyValue

Types

type Monitor

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

func NewOtelGRPCMonitor

func NewOtelGRPCMonitor(hostName string) Monitor

func (*Monitor) GetAttributes

func (m *Monitor) GetAttributes() []attribute.KeyValue

func (*Monitor) RecordStream

func (m *Monitor) RecordStream(ctx context.Context, start time.Time, method string, err error)

func (*Monitor) RecordUnary

func (m *Monitor) RecordUnary(ctx context.Context, p UnaryParams)

func (*Monitor) StreamClientInterceptor

func (m *Monitor) StreamClientInterceptor() grpc.StreamClientInterceptor

func (*Monitor) UnaryClientInterceptor

func (m *Monitor) UnaryClientInterceptor() grpc.UnaryClientInterceptor

type UnaryParams

type UnaryParams struct {
	Start  time.Time
	Method string
	Req    any
	Res    any
	Err    error
}

Jump to

Keyboard shortcuts

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