verifier

package module
v0.0.0-...-08d6691 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(cond bool, format string, args ...interface{})

func GetAttribute

func GetAttribute(attrs []attribute.KeyValue, name string) attribute.Value

func GetAttributesWithPrefix

func GetAttributesWithPrefix(attrs []attribute.KeyValue, prefix string) []string

Get all attrs with a prefix like `db.query.parameter.0` with `db.query.parameter`

func GetFreePort

func GetFreePort() (int, error)

func GetServer

func GetServer(ctx context.Context, url string) (string, error)

func SliceAttrsAssert

func SliceAttrsAssert(expectAttrs []any, actualAttrs []string, format string, args ...interface{})

Compare two attrs of slice type

func VerifyDbAttributes

func VerifyDbAttributes(span tracetest.SpanStub, name, system, address, statement, operation, collection string, params []any)

VerifyDbAttributes TODO: make attribute name to semconv attribute

func VerifyDbMetricsAttributes

func VerifyDbMetricsAttributes(attrs []attribute.KeyValue, dbSystem, operationName, serverAddress string)

func VerifyGenAIOperationDurationMetricsAttributes

func VerifyGenAIOperationDurationMetricsAttributes(attrs []attribute.KeyValue, operationName, system, requestModel, responseModel string)

func VerifyHttpClientAttributes

func VerifyHttpClientAttributes(span tracetest.SpanStub, name, method, fullUrl, protocolName, protocolVersion, networkTransport, networkType, localAddr, peerAddr string, statusCode, localPort, peerPort int64)

func VerifyHttpClientMetricsAttributes

func VerifyHttpClientMetricsAttributes(attrs []attribute.KeyValue, method, serverAddress, errorType, protocolName, protocolVersion string, serverPort, statusCode int)

func VerifyHttpServerAttributes

func VerifyHttpServerAttributes(span tracetest.SpanStub, name, method, protocolName, networkTransport, networkType, localAddr, peerAddr, agent, scheme, path, query, route string, statusCode int64)

func VerifyHttpServerMetricsAttributes

func VerifyHttpServerMetricsAttributes(attrs []attribute.KeyValue, method, httpRoute, errorType, protocolName, protocolVersion, urlScheme string, statusCode int)

func VerifyK8sPodEventAttributes

func VerifyK8sPodEventAttributes(span tracetest.SpanStub, eventType, objectName, objectKind, objectNamespace string, objectApiVersion string)

func VerifyLLMAttributes

func VerifyLLMAttributes(span tracetest.SpanStub, name string, system string, model string)

func VerifyLLMAttributesWithGenAISpanKind

func VerifyLLMAttributesWithGenAISpanKind(span tracetest.SpanStub, name string, system string, model string, genaiSpanKind string)

func VerifyLLMCommonAttributes

func VerifyLLMCommonAttributes(span tracetest.SpanStub, name string, system string, spanKind trace.SpanKind)

func VerifyLLMCommonAttributesWithGenAISpanKind

func VerifyLLMCommonAttributesWithGenAISpanKind(span tracetest.SpanStub, name string, system string, spanKind trace.SpanKind, genaiSpanKind string)

func VerifyMQConsumeAttributes

func VerifyMQConsumeAttributes(span tracetest.SpanStub, exchange, routing, queue, operationName, destination string, system string)

func VerifyMQPublishAttributes

func VerifyMQPublishAttributes(span tracetest.SpanStub, exchange, routing, queue, operationName, destination string, system string)

func VerifyMQTTMessageBodySize

func VerifyMQTTMessageBodySize(span tracetest.SpanStub, minSize int64)

VerifyMQTTMessageBodySize verifies message body size attribute

func VerifyMQTTPublishAttributes

func VerifyMQTTPublishAttributes(span tracetest.SpanStub, topic string, qos byte, expectedError bool)

VerifyMQTTPublishAttributes verifies span attributes for MQTT publish operation

func VerifyMQTTReceiveAttributes

func VerifyMQTTReceiveAttributes(span tracetest.SpanStub, topic string, expectedError bool)

VerifyMQTTReceiveAttributes verifies span attributes for MQTT receive/process operation

func VerifyMQTTSubscribeAttributes

func VerifyMQTTSubscribeAttributes(span tracetest.SpanStub, topic string, qos byte, expectedError bool)

VerifyMQTTSubscribeAttributes verifies span attributes for MQTT subscribe operation

func VerifyMQTTTraceContext

func VerifyMQTTTraceContext(publisher tracetest.SpanStub, subscriber tracetest.SpanStub)

VerifyMQTTTraceContext verifies trace context propagation between publisher and subscriber

func VerifyRpcClientAttributes

func VerifyRpcClientAttributes(span tracetest.SpanStub, name, system, service, method string)

func VerifyRpcClientMetricsAttributes

func VerifyRpcClientMetricsAttributes(attrs []attribute.KeyValue, method, service, system, serverAddr string)

func VerifyRpcServerAttributes

func VerifyRpcServerAttributes(span tracetest.SpanStub, name, system, service, method string)

func VerifyRpcServerMetricsAttributes

func VerifyRpcServerMetricsAttributes(attrs []attribute.KeyValue, method, service, system, serverAddr string)

func VerifySentinelAttributes

func VerifySentinelAttributes(span tracetest.SpanStub, resourceName, EntryType, BlockType string, IsBlocked bool)

func WaitAndAssertMetrics

func WaitAndAssertMetrics(metricVerifiers map[string]func(metricdata.ResourceMetrics))

func WaitAndAssertTraces

func WaitAndAssertTraces(traceVerifiers func([]tracetest.SpanStubs), numTraces int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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