verifier

package module
v0.0.0-...-62831da Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const IS_IN_TEST = "IN_OTEL_TEST"

Variables

View Source
var ManualReader = metric.NewManualReader()

Functions

func Assert

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

func GetAttribute

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

func GetFreePort

func GetFreePort() (int, error)

func GetServer

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

func GetSpanExporter

func GetSpanExporter() trace.SpanExporter

func GetTestMetrics

func GetTestMetrics() (metricdata.ResourceMetrics, error)

func GetTestSpans

func GetTestSpans() *tracetest.SpanStubs

func IsInTest

func IsInTest() bool

func ResetTestSpans

func ResetTestSpans()

func VerifyDbAttributes

func VerifyDbAttributes(span tracetest.SpanStub, name, system, address, statement, operation string)

VerifyDbAttributes TODO: make attribute name to semconv attribute

func VerifyDbMetricsAttributes

func VerifyDbMetricsAttributes(attrs []attribute.KeyValue, dbSystem, operationName, serverAddress 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 VerifyLLMAttributes

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

func VerifyLLMCommonAttributes

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

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 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