Documentation
¶
Index ¶
- type Config
- type Service
- func (s *Service) Initialize(ctx context.Context) error
- func (s *Service) Shutdown(ctx context.Context) error
- func (s *Service) StartActivity(ctx context.Context, activityName string) (context.Context, oteltrace.Span)
- func (s *Service) TrackServiceStartup(ctx context.Context)
- func (s *Service) TrackToolInvocation(ctx context.Context, toolName string, operation string, success bool)
- type TelemetryInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Enabled controls whether telemetry collection is active
Enabled bool
// DeviceID is a hashed MAC address for device identification
DeviceID string
// OTLPEndpoint for OpenTelemetry Protocol export
OTLPEndpoint string
// ServiceName identifies the service in telemetry
ServiceName string
// ServiceVersion identifies the service version in telemetry
ServiceVersion string
// contains filtered or unexported fields
}
Config represents the telemetry configuration
func (*Config) HasApplicationInsights ¶
HasApplicationInsights returns whether application insights export is configured
func (*Config) SetOTLPEndpoint ¶
SetOTLPEndpoint sets the OTLP endpoint for CLI configuration
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides telemetry functionality for Kubernetes MCP
func NewService ¶
NewService creates a new telemetry service
func (*Service) Initialize ¶
Initialize sets up the telemetry providers and exporters
func (*Service) StartActivity ¶
func (s *Service) StartActivity(ctx context.Context, activityName string) (context.Context, oteltrace.Span)
StartActivity starts a new telemetry activity (span)
func (*Service) TrackServiceStartup ¶
TrackServiceStartup tracks the MCP server startup
type TelemetryInterface ¶
type TelemetryInterface interface {
// Initialize sets up the telemetry providers and exporters
Initialize(ctx context.Context) error
// Shutdown gracefully shuts down the telemetry service
Shutdown(ctx context.Context) error
// StartActivity starts a new telemetry activity (span)
StartActivity(ctx context.Context, activityName string) (context.Context, trace.Span)
// TrackToolInvocation tracks a tool invocation with minimal data
TrackToolInvocation(ctx context.Context, toolName string, operation string, success bool)
// TrackServiceStartup tracks the MCP server startup
TrackServiceStartup(ctx context.Context)
}
TelemetryInterface defines the methods available for telemetry tracking
Click to show internal directories.
Click to hide internal directories.