observability

package
v0.303.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttrGenAISystem                = "gen_ai.system"
	AttrGenAIOperationName         = "gen_ai.operation.name"
	AttrGenAIRequestModel          = "gen_ai.request.model"
	AttrGenAIRequestMaxTokens      = "gen_ai.request.max_tokens"
	AttrGenAIResponseModel         = "gen_ai.response.model"
	AttrGenAIResponseFinishReasons = "gen_ai.response.finish_reasons"
	AttrGenAIUsageInputTokens      = "gen_ai.usage.input_tokens"
	AttrGenAIUsageOutputTokens     = "gen_ai.usage.output_tokens"
	AttrGenAICacheReadTokens       = "gen_ai.usage.cache_read_input_tokens"
	AttrGenAICacheCreationTokens   = "gen_ai.usage.cache_creation_input_tokens"
	AttrGenAIToolCallName          = "gen_ai.tool.name"
	AttrGenAIToolCallID            = "gen_ai.tool.call.id"
	AttrGenAIMessageCount          = "gen_ai.request.message_count"
	AttrGenAIToolCount             = "gen_ai.request.tool_count"
)

GenAI semantic convention attribute keys (OpenTelemetry GenAI Semconv v1.27)

Variables

This section is empty.

Functions

func Init

func Init(cfg config.OpenLitConfig, appVersion string) (func(context.Context) error, error)

Init initializes the OTLP TracerProvider pointing to OpenLit. Returns a shutdown function that must be called on app exit.

func IsEnabled

func IsEnabled() bool

IsEnabled returns true if OpenLit observability is active

func Tracer

func Tracer() trace.Tracer

Tracer returns the configured tracer (noop if disabled)

Types

This section is empty.

Jump to

Keyboard shortcuts

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