Documentation
¶
Index ¶
- type Collector
- type MetricsCollector
- func (m *MetricsCollector) RecordError(ctx context.Context, operation string, errorType string)
- func (m *MetricsCollector) RecordOperation(ctx context.Context, operation string, status string, durationMs int64)
- func (m *MetricsCollector) RecordStage(ctx context.Context, operation string, stage string, durationMs int64)
- func (m *MetricsCollector) Registry() *prometheus.Registry
- func (m *MetricsCollector) SetStorageCount(ctx context.Context, storageType string, count int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface {
RecordOperation(ctx context.Context, operation string, status string, durationMs int64)
RecordStage(ctx context.Context, operation string, stage string, durationMs int64)
RecordError(ctx context.Context, operation string, errorType string)
SetStorageCount(ctx context.Context, storageType string, count int64)
}
Collector is the interface for metrics collection. Implementations include the Prometheus-backed collector (when built with -tags metrics) and the no-op collector (default build without metrics tag).
type MetricsCollector ¶
type MetricsCollector struct {
// contains filtered or unexported fields
}
MetricsCollector provides Prometheus metrics collection for gognee operations
func NewCollector ¶
func NewCollector() *MetricsCollector
NewCollector creates a new Prometheus metrics collector
func (*MetricsCollector) RecordError ¶ added in v1.3.0
func (m *MetricsCollector) RecordError(ctx context.Context, operation string, errorType string)
RecordError records an error occurrence
func (*MetricsCollector) RecordOperation ¶ added in v1.3.0
func (m *MetricsCollector) RecordOperation(ctx context.Context, operation string, status string, durationMs int64)
RecordOperation records the completion of an operation
func (*MetricsCollector) RecordStage ¶ added in v1.3.0
func (m *MetricsCollector) RecordStage(ctx context.Context, operation string, stage string, durationMs int64)
RecordStage records the duration of a specific stage within an operation
func (*MetricsCollector) Registry ¶ added in v1.3.0
func (m *MetricsCollector) Registry() *prometheus.Registry
Registry returns the Prometheus registry for HTTP exposure
func (*MetricsCollector) SetStorageCount ¶ added in v1.3.0
func (m *MetricsCollector) SetStorageCount(ctx context.Context, storageType string, count int64)
SetStorageCount sets the current count for a storage type
Click to show internal directories.
Click to hide internal directories.