observability

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package observability provides metrics capabilities for ethpandaops-panda.

Package observability provides metrics capabilities for ethpandaops-panda.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ToolCallsTotal counts the total number of tool calls by tool name and status.
	ToolCallsTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: metricsNamespace,
			Name:      "tool_calls_total",
			Help:      "Total number of tool calls",
		},
		[]string{"tool", "status"},
	)

	// ToolCallDuration measures the duration of tool calls in seconds.
	ToolCallDuration = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: metricsNamespace,
			Name:      "tool_call_duration_seconds",
			Help:      "Duration of tool calls in seconds",
			Buckets:   prometheus.ExponentialBuckets(0.1, 2, 10),
		},
		[]string{"tool"},
	)
)

Tool call metrics.

View Source
var (
	// ActiveConnections tracks the number of active MCP connections.
	ActiveConnections = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Namespace: metricsNamespace,
			Name:      "active_connections",
			Help:      "Number of active MCP connections",
		},
	)
)

Connection metrics.

Functions

This section is empty.

Types

type Service

type Service interface {
	// Start initializes and starts the metrics HTTP server if enabled.
	Start(ctx context.Context) error
	// Stop gracefully shuts down the metrics server.
	Stop() error
}

Service defines the interface for observability services.

func NewService

NewService creates a new observability service.

Jump to

Keyboard shortcuts

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