Documentation
¶
Index ¶
- Constants
- Variables
- func LLMIdentityAttrs(provider, model, tenantID, userID, feature string) []attribute.KeyValue
- func LLMRequestAttrs(provider, model, tenantID, userID, feature, status string) []attribute.KeyValue
- func LLMTokenAttrs(provider, model, tenantID, userID, feature, tokenType string) []attribute.KeyValue
- func LLMTraceAttrs(provider, model, tenantID, userID, feature, traceID string) []attribute.KeyValue
- func LoggerWithTrace(ctx context.Context, logger *zap.Logger) *zap.Logger
- type Providers
Constants ¶
View Source
const ( LogFieldTraceID = "trace_id" LogFieldSpanID = "span_id" )
Variables ¶
View Source
var ( AttrTraceID = attribute.Key("trace.id") AttrTraceType = attribute.Key("trace.type") AttrTenantID = attribute.Key("tenant.id") AttrUserID = attribute.Key("user.id") AttrLLMProvider = attribute.Key("llm.provider") AttrLLMModel = attribute.Key("llm.model") AttrLLMFeature = attribute.Key("llm.feature") AttrLLMStatus = attribute.Key("llm.status") AttrLLMTokenType = attribute.Key("llm.token.type") AttrLLMCacheHit = attribute.Key("llm.cache.hit") AttrLLMFallback = attribute.Key("llm.fallback") AttrLLMFallbackLevel = attribute.Key("llm.fallback.level") AttrLLMDurationMS = attribute.Key("llm.duration.ms") AttrLLMCost = attribute.Key("llm.cost") AttrToolName = attribute.Key("tool.name") AttrToolSuccess = attribute.Key("tool.success") AttrToolDurationMS = attribute.Key("tool.duration.ms") AttrErrorCode = attribute.Key("error.code") AttrErrorMessage = attribute.Key("error.message") )
Functions ¶
func LLMIdentityAttrs ¶ added in v1.11.0
func LLMRequestAttrs ¶ added in v1.11.0
func LLMTokenAttrs ¶ added in v1.11.0
func LLMTraceAttrs ¶ added in v1.11.0
Types ¶
type Providers ¶
type Providers struct {
// contains filtered or unexported fields
}
Providers holds the OTel SDK TracerProvider and MeterProvider. When telemetry is disabled, both fields are nil and Shutdown is a no-op.
Click to show internal directories.
Click to hide internal directories.