tracing

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// trace attribute key constants
	RequestPath = "request_path"

	InterceptionID = "interception_id"
	InitiatorID    = "user_id"
	Provider       = "provider"
	Model          = "model"
	Streaming      = "streaming"
	IsBedrock      = "aws_bedrock"

	PassthroughURL    = "passthrough_url"
	PassthroughMethod = "passthrough_method"

	MCPInput      = "mcp_input"
	MCPProxyName  = "mcp_proxy_name"
	MCPToolName   = "mcp_tool_name"
	MCPServerName = "mcp_server_name"
	MCPServerURL  = "mcp_server_url"
	MCPToolCount  = "mcp_tool_count"

	APIKeyID = "api_key_id"
)

Variables

This section is empty.

Functions

func EndSpanErr

func EndSpanErr(span trace.Span, err *error)

EndSpanErr ends given span and sets Error status if error is not nil uses pointer to error because defer evaluates function arguments when defer statement is executed not when deferred function is called

example usage:

func Example() (result any, outErr error) {
    _, span := tracer.Start(...)
    defer tracing.EndSpanErr(span, &outErr)

}

func InterceptionAttributesFromContext

func InterceptionAttributesFromContext(ctx context.Context) []attribute.KeyValue

func RequestBridgeAttributesFromContext

func RequestBridgeAttributesFromContext(ctx context.Context) []attribute.KeyValue

func WithInterceptionAttributesInContext

func WithInterceptionAttributesInContext(ctx context.Context, traceAttrs []attribute.KeyValue) context.Context

func WithRequestBridgeAttributesInContext

func WithRequestBridgeAttributesInContext(ctx context.Context, traceAttrs []attribute.KeyValue) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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