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)
Click to show internal directories.
Click to hide internal directories.