telemetry

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

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)

Jump to

Keyboard shortcuts

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