Add compression and histogram metric type for Prometheus (#987)

Fixes #932
Also fixes #966

Decided not to add Summary type because it has the same functionality as Histogram but makes more calculations on client side (Clio side). See https://prometheus.io/docs/practices/histograms for detailed comparison.
This commit is contained in:
Sergey Kuznetsov
2023-11-22 12:55:06 +00:00
committed by GitHub
parent 8ebe2d6a80
commit b998473673
41 changed files with 2230 additions and 619 deletions

View File

@@ -36,11 +36,14 @@ ETLService::runETLPipeline(uint32_t startSequence, uint32_t numExtractors)
LOG(log_.debug()) << "Starting etl pipeline";
state_.isWriting = true;
auto rng = backend_->hardFetchLedgerRangeNoThrow();
if (!rng || rng->maxSequence < startSequence - 1) {
assert(false);
throw std::runtime_error("runETLPipeline: parent ledger is null");
}
auto const rng = backend_->hardFetchLedgerRangeNoThrow();
ASSERT(rng.has_value(), "Parent ledger range can't be null");
ASSERT(
rng->maxSequence < startSequence - 1,
"Got not parent ledger. rnd->maxSequence = {}, startSequence = {}",
rng->maxSequence,
startSequence
);
auto const begin = std::chrono::system_clock::now();
auto extractors = std::vector<std::unique_ptr<ExtractorType>>{};