Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SearchOverall = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db_ingestor", Subsystem: "search", Name: "total", Help: "", }) SearchColdTotal = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db_ingestor", Subsystem: "search", Name: "cold_total", Help: "", }) SearchColdErrors = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db_ingestor", Subsystem: "search", Name: "cold_errors_total", Help: "", }) SearchErrors = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db_ingestor", Subsystem: "search", Name: "errors_total", Help: "", }) IngestorPanics = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db_ingestor", Subsystem: "common", Name: "panics_total", Help: "", }) SearchPartial = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db_ingestor", Subsystem: "search", Name: "partial_total", Help: "Number of searches ending with partial response", }) IngestorBulkDocProvideDurationSeconds = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_ingestor", Subsystem: "bulk", Name: "doc_provide_duration_seconds", Help: "", Buckets: SecondsBuckets, }) IngestorBulkSendAttemptDurationSeconds = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_ingestor", Subsystem: "bulk", Name: "send_attempt_duration_seconds", Help: "", Buckets: SecondsBuckets, }) IngestorBulkAttemptErrorDurationSeconds = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_ingestor", Subsystem: "bulk", Name: "attempt_error_duration_seconds", Help: "", Buckets: SecondsBuckets, }) IngestorBulkSkipCold = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db_ingestor", Subsystem: "bulk", Name: "skip_cold_total", Help: "", }) IngestorBulkSkipShard = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db_ingestor", Subsystem: "bulk", Name: "skip_shard_total", Help: "", }) BulkErrors = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db_ingestor", Subsystem: "bulk", Name: "errors_total", Help: "", }) DocumentsFetched = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_ingestor", Subsystem: "fetch", Name: "total_fetched_documents", Help: "Number of documents returned by the Fetch method", Buckets: prometheus.ExponentialBuckets(1, 2, 16), }) DocumentsRequested = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_ingestor", Subsystem: "fetch", Name: "total_requested_documents", Help: "Number of documents requested using the Fetch method", Buckets: prometheus.ExponentialBuckets(1, 3, 16), }) FetchErrors = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db_ingestor", Subsystem: "fetch", Name: "errors_total", Help: "", }) FetchNotFoundError = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_ingestor", Subsystem: "fetch", Name: "not_found_errors", Help: "", Buckets: prometheus.ExponentialBuckets(1, 3, 16), }) FetchDuplicateErrors = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_ingestor", Subsystem: "fetch", Name: "duplicate_errors", Help: "", Buckets: prometheus.ExponentialBuckets(1, 3, 16), }) RateLimiterSize = promauto.NewGauge(prometheus.GaugeOpts{ Namespace: "seq_db_ingestor", Subsystem: "ratelimiter", Name: "map_size", Help: "Size of internal map of rate limiter", }) CircuitBreakerSuccess = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: "seq_db_ingestor", Subsystem: "circuit_breaker", Name: "success", Help: "Count of each time `Execute` does not return an error", }, []string{"name"}) CircuitBreakerErr = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: "seq_db_ingestor", Subsystem: "circuit_breaker", Name: "err", Help: "The number of errors that have occurred in the circuit breaker", }, []string{"name", "kind"}) CircuitBreakerState = promauto.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "seq_db_ingestor", Subsystem: "circuit_breaker", Name: "state", Help: "The state of the circuit breaker", }, []string{"name"}) ExportDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ Namespace: "seq_db_ingestor", Subsystem: "export", Name: "duration", Help: "", Buckets: prometheus.ExponentialBuckets(1, 2, 25), }, []string{"protocol"}) ExportSize = promauto.NewHistogramVec(prometheus.HistogramOpts{ Namespace: "seq_db_ingestor", Subsystem: "export", Name: "size", Help: "", Buckets: prometheus.ExponentialBuckets(1, 2, 50), }, []string{"protocol"}) CurrentExportersCount = promauto.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "seq_db_ingestor", Subsystem: "export", Name: "current_exporters_count", Help: "", }, []string{"protocol"}) TokenizerTokensPerMessage = promauto.NewHistogramVec(prometheus.HistogramOpts{ Namespace: "seq_db_ingestor", Subsystem: "tokenizer", Name: "tokens_per_message", Help: "", Buckets: prometheus.ExponentialBuckets(1, 2, 16), }, []string{"tokenizer"}) TokenizerParseDurationSeconds = promauto.NewHistogramVec(prometheus.HistogramOpts{ Namespace: "seq_db_ingestor", Subsystem: "tokenizer", Name: "parse_duration_seconds", Help: "", Buckets: SecondsBuckets, }, []string{"tokenizer"}) TokenizerIncomingTextLen = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_ingestor", Subsystem: "tokenizer", Name: "incoming_text_len", Help: "", Buckets: prometheus.ExponentialBuckets(1, 2, 16), }) )
View Source
var ( Version = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: "seq_db", Name: "version", Help: "", }, []string{"version"}) RepetitionsDocsTotal = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db", Subsystem: "merge", Name: "repetitions_docs_total", Help: "", }) CountersTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: "seq_db", Subsystem: "common", Name: "counters_total", Help: "", }, []string{"name"}) // SecondsBuckets covers range from 1ms to 177s. SecondsBuckets = prometheus.ExponentialBuckets(0.001, 3, 12) // SecondsBucketsDelay covers range from 1min to 2048min. SecondsBucketsDelay = prometheus.ExponentialBuckets(60, 2, 12) // SecondsRanges covers range from 1min to 47day. SecondsRanges = prometheus.ExponentialBuckets(60, 2.1, 16) )
View Source
var ( DataSizeTotal = promauto.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "seq_db_store", Subsystem: "common", Name: "data_size_total", Help: "", }, []string{"kind", "storage_type"}) OldestFracTime = promauto.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "seq_db_store", Subsystem: "common", Name: "oldest_frac_time", Help: "", }, []string{"storage_type"}) BulkDurationSeconds = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_store", Subsystem: "bulk", Name: "duration_seconds", Help: "", Buckets: SecondsBuckets, }) BulkDuplicateDocsTotal = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_store", Subsystem: "bulk", Name: "duplicate_docs_total", Help: "", Buckets: prometheus.ExponentialBuckets(1, 4, 16), }) BulkDocsTotal = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_store", Subsystem: "bulk", Name: "docs_total", Help: "", Buckets: prometheus.ExponentialBuckets(1, 4, 16), }) BulkDocBytesTotal = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_store", Subsystem: "bulk", Name: "doc_bytes_total", Help: "", Buckets: prometheus.ExponentialBuckets(1, 4, 16), }) BulkMetaBytesTotal = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_store", Subsystem: "bulk", Name: "meta_bytes_total", Help: "", Buckets: prometheus.ExponentialBuckets(1, 4, 16), }) SearchInFlightQueriesTotal = promauto.NewGauge(prometheus.GaugeOpts{ Namespace: "seq_db_store", Subsystem: "search", Name: "in_flight_queries_total", Help: "", }) RejectedRequests = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: "seq_db_store", Name: "rejected_requests", Help: "", }, []string{"method", "type"}) SearchDurationSeconds = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_store", Subsystem: "search", Name: "duration_seconds", Help: "", Buckets: SecondsBuckets, }) SearchRangesSeconds = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_store", Subsystem: "search", Name: "ranges_seconds", Help: "", Buckets: SecondsRanges, }) FetchInFlightQueriesTotal = promauto.NewGauge(prometheus.GaugeOpts{ Namespace: "seq_db_store", Subsystem: "fetch", Name: "in_flight_queries_total", Help: "", }) FetchDurationSeconds = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_store", Subsystem: "fetch", Name: "duration_seconds", Help: "", Buckets: SecondsBuckets, }) FetchDocsTotal = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_store", Subsystem: "fetch", Name: "docs_total", Help: "", Buckets: prometheus.ExponentialBuckets(1, 4, 32), }) FetchDocsNotFound = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_store", Subsystem: "fetch", Name: "docs_not_found", Help: "", Buckets: prometheus.ExponentialBuckets(1, 4, 32), }) FetchBytesTotal = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_store", Subsystem: "fetch", Name: "bytes_total", Help: "", Buckets: prometheus.ExponentialBuckets(256, 4, 32), }) MaintenanceTruncateTotal = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db_store", Subsystem: "maintenance", Name: "truncate_total", Help: "", }) StoreReady = promauto.NewGauge(prometheus.GaugeOpts{ Namespace: "seq_db_store", Subsystem: "main", Name: "ready", Help: "store is ready to accept requests", }) FractionLoadErrors = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db_store", Subsystem: "main", Name: "fraction_load_errors", Help: "Doc file load errors (missing or invalid doc file)", }) StorePanics = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "seq_db_store", Subsystem: "common", Name: "panics_total", Help: "", }) SkippedIndexesText = skippedIndexes.WithLabelValues("text") SkippedIndexesKeyword = skippedIndexes.WithLabelValues("keyword") SkippedIndexesPath = skippedIndexes.WithLabelValues("path") SkippedIndexesBytesText = skippedIndexesBytes.WithLabelValues("text") SkippedIndexesBytesKeyword = skippedIndexesBytes.WithLabelValues("keyword") SkippedIndexesBytesPath = skippedIndexesBytes.WithLabelValues("path") OffloadingTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: "seq_db_store", Subsystem: "offloading", Name: "total", Help: "How many fractions were offloaded", }, []string{"status"}) OffloadingDurationSeconds = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "seq_db_store", Subsystem: "offloading", Name: "duration_seconds", Help: "How many seconds it took to offload fraction to remote storage", Buckets: SecondsBuckets, }) )
Functions ¶
This section is empty.
Types ¶
type RollingAverage ¶
type RollingAverage struct {
// contains filtered or unexported fields
}
RollingAverage can compute average in a rolling window.
func NewRollingAverage ¶
func NewRollingAverage(sampleSize int) *RollingAverage
func (*RollingAverage) Append ¶
func (r *RollingAverage) Append(value int)
Append the value to the sample.
func (*RollingAverage) Filled ¶
func (r *RollingAverage) Filled() bool
Filled returns true if the sample is filled.
Click to show internal directories.
Click to hide internal directories.