semconv

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ResultEventName = "result"

Variables

This section is empty.

Functions

func AddrAttrs

func AddrAttrs(addr net.Addr) []attribute.KeyValue

func TypeStr

func TypeStr(a any) (str string)

Types

type CmdStreamClient

type CmdStreamClient[T any] struct {
	CmdStreamCommon[T]
	// contains filtered or unexported fields
}

func NewCmdStreamClient

func NewCmdStreamClient[T any](remoteAddr net.Addr,
	meter metric.Meter) (client CmdStreamClient[T])

func (CmdStreamClient[T]) SpanAttrs

func (c CmdStreamClient[T]) SpanAttrs(sentCmd hooks.SentCmd[T],
	addAttrs []attribute.KeyValue) (attrs []attribute.KeyValue)

type CmdStreamCommon

type CmdStreamCommon[T any] struct {
	// contains filtered or unexported fields
}

func NewCmdStreamCommon

func NewCmdStreamCommon[T any](meter metric.Meter, fn unitsFn) (
	c CmdStreamCommon[T])

func (CmdStreamCommon[T]) CmdTypeAttr

func (c CmdStreamCommon[T]) CmdTypeAttr(cmd core.Cmd[T]) attribute.KeyValue

func (CmdStreamCommon[T]) ErrorTypeAttr

func (c CmdStreamCommon[T]) ErrorTypeAttr(err error) attribute.KeyValue

func (CmdStreamCommon[T]) RecordCmdMetrics

func (c CmdStreamCommon[T]) RecordCmdMetrics(ctx context.Context,
	sentCmd hooks.SentCmd[T],
	status semconv.CmdStreamCommandStatus,
	elapsedTime float64,
	addAttrs []attribute.KeyValue,
)

func (CmdStreamCommon[T]) RecordResultMetrics

func (c CmdStreamCommon[T]) RecordResultMetrics(ctx context.Context,
	sentCmd hooks.SentCmd[T],
	recvResult hooks.ReceivedResult,
	elapsedTime float64,
	addAttrs []attribute.KeyValue,
)

func (CmdStreamCommon[T]) ResultTypeAttr

func (c CmdStreamCommon[T]) ResultTypeAttr(result core.Result) attribute.KeyValue

func (CmdStreamCommon[T]) TypeAttrValue

func (c CmdStreamCommon[T]) TypeAttrValue(t reflect.Type) (value string)

type CmdStreamServer

type CmdStreamServer[T any] struct {
	CmdStreamCommon[T]
}

func NewCmdStreamServer

func NewCmdStreamServer[T any](localAddr net.Addr,
	meter metric.Meter) (client CmdStreamServer[T])

func (CmdStreamServer[T]) SpanAttrs

func (c CmdStreamServer[T]) SpanAttrs(remoteAddr net.Addr,
	addAttrs []attribute.KeyValue) (attrs []attribute.KeyValue)

func (CmdStreamServer[T]) SpanResultEventAttrs

func (c CmdStreamServer[T]) SpanResultEventAttrs(sentCmd hooks.SentCmd[T],
	recvResult hooks.ReceivedResult,
	addAttrs []attribute.KeyValue,
) (attrs []attribute.KeyValue)

Jump to

Keyboard shortcuts

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