Documentation ¶
Index ¶
Constants ¶
View Source
const ( MetricsNamespace = "copilot" MetricsSubsystemSystem = "system" MetricsSubsystemHTTP = "http" MetricsSubsystemAPI = "api" MetricsSubsystemLLM = "llm" MetricsCloudInstallationLabel = "installationId" MetricsVersionLabel = "version" )
Variables ¶
This section is empty.
Functions ¶
func NewMetricsHandler ¶
NewMetricsHandler creates an HTTP handler to expose metrics.
Types ¶
type ErrorLoggerWrapper ¶
type ErrorLoggerWrapper struct { }
func (*ErrorLoggerWrapper) Println ¶
func (el *ErrorLoggerWrapper) Println(v ...interface{})
type InstanceInfo ¶
type Metrics ¶
type Metrics interface { GetRegistry() *prometheus.Registry ObserveAPIEndpointDuration(handler, method, statusCode string, elapsed float64) IncrementHTTPRequests() IncrementHTTPErrors() GetMetricsForAIService(llmName string) *llmMetrics }
func NewMetrics ¶
func NewMetrics(info InstanceInfo) Metrics
NewMetrics Factory method to create a new metrics collector.
Click to show internal directories.
Click to hide internal directories.