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 ¶
func NewService(log logrus.FieldLogger, cfg config.ObservabilityConfig) Service
NewService creates a new observability service.
Click to show internal directories.
Click to hide internal directories.