Documentation
¶
Index ¶
- Constants
- func EndSpanErr(span trace.Span, err *error)
- func InterceptionAttributesFromContext(ctx context.Context) []attribute.KeyValue
- func RequestBridgeAttributesFromContext(ctx context.Context) []attribute.KeyValue
- func WithInterceptionAttributesInContext(ctx context.Context, traceAttrs []attribute.KeyValue) context.Context
- func WithRequestBridgeAttributesInContext(ctx context.Context, traceAttrs []attribute.KeyValue) context.Context
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 ¶
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)
}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.