Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ We use the following categories for changes:
reader and writer [#1020].
- Run timescaledb-tune with the promscale profile [#1615]
- Propagate the context from received HTTP read requests downstream to database
requests [#1205].
requests [#1205]

### Changed
- Log throughput in the same line for samples, spans and metric metadata [#1643]

### Fixed
- Fix broken cache eviction in clockcache [#1603]
Expand Down
18 changes: 13 additions & 5 deletions pkg/util/throughput/throughput.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,24 @@ func (tc *throughputCalc) run() {
continue
}

if samplesRate+metadataRate != 0 {
// Metric data ingested.
throughput := []interface{}{"msg", "ingestor throughput"}
if samplesRate != 0 {
maxSentTs := timestamp.Time(atomic.LoadInt64(&tc.metricsMaxSentTs))
log.Info("msg", "ingestor throughput", "samples/sec", int(samplesRate), "metrics-max-sent-ts", maxSentTs)
throughput = append(throughput, []interface{}{"samples/sec", int(samplesRate), "metrics-max-sent-ts", maxSentTs}...)
}

if spansRate != 0 {
// Spans ingested.
spansLastWriteOn := timestamp.Time(atomic.LoadInt64(&tc.spansLastWriteOn))
log.Info("msg", "ingestor throughput", "spans/sec", int(spansRate), "spans-last-write-on", spansLastWriteOn)
throughput = append(throughput, []interface{}{"spans/sec", int(spansRate), "spans-last-write-on", spansLastWriteOn}...)
}

if metadataRate != 0 {
throughput = append(throughput, []interface{}{"metric-metadata/sec", int(metadataRate)}...)
}

if len(throughput) > 2 {
// Log only if we had any activity.
log.Info(throughput...)
}
}
}
Expand Down