telemetry

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TracerName = "github.com/googleapis/mcp-toolbox/internal/opentel"
	MetricName = "github.com/googleapis/mcp-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

type Instrumentation struct {
	Tracer trace.Tracer

	McpOperationDuration  metric.Float64Histogram
	McpSessionDuration    metric.Float64Histogram
	McpActiveSessions     metric.Int64UpDownCounter
	ToolExecutionDuration metric.Float64Histogram
	// contains filtered or unexported fields
}

Instrumentation defines the telemetry instrumentation for toolbox

func CreateTelemetryInstrumentation

func CreateTelemetryInstrumentation(versionString string) (*Instrumentation, error)

Jump to

Keyboard shortcuts

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