Documentation
¶
Index ¶
Constants ¶
View Source
const ( TracerName = "github.com/googleapis/genai-toolbox/internal/opentel" MetricName = "github.com/googleapis/genai-toolbox/internal/opentel" )
Variables ¶
This section is empty.
Functions ¶
func SetupOTel ¶
func SetupOTel(ctx context.Context, versionString, telemetryOTLP string, telemetryGCP bool, telemetryServiceName string) (shutdown func(context.Context) error, err error)
setupOTelSDK bootstraps the OpenTelemetry pipeline. If it does not return an error, make sure to call shutdown for proper cleanup.
Types ¶
type Instrumentation ¶ added in v0.9.0
type Instrumentation struct {
Tracer trace.Tracer
ToolsetGet metric.Int64Counter
ToolGet metric.Int64Counter
ToolInvoke metric.Int64Counter
McpSse metric.Int64Counter
McpPost metric.Int64Counter
// contains filtered or unexported fields
}
Instrumentation defines the telemetry instrumentation for toolbox
func CreateTelemetryInstrumentation ¶ added in v0.9.0
func CreateTelemetryInstrumentation(versionString string) (*Instrumentation, error)
Click to show internal directories.
Click to hide internal directories.