-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consumption_metrics: send timeline_written_size_delta #4822
Conversation
As far as testing this thing goes... Unsure if a test should be added. I am quite unsure on how to add non-flaky tests in general :) After overhauling the consumption metrics sending completly we could easily test this out. |
1240 tests run: 1185 passed, 0 failed, 55 skipped (full report) |
Tagged @lubennikovaav fore review as well. Shany is on vacation and I think that I'm only partially capable of doing review here |
no need to keep them separate anymore.
because why not, assuming it will keep growing with similar ... variants, if there can be any, those should also be copy.
this should give us a data point in the first iteration as well.
this is just the written_size_delta_bytes.
restore the name of factory fn to be unrelated of the suffix.
if we would always use the latest absolute time, it would work until last_record_lsn stops to update because compute is down. after the value no longer grows, we will no longer send it, and thus the cached value will no longer advance. however incremental values are not cache deduplicated, so we would had started the time range for the incremental value from the last absolute value. perhaps this could be the cached incremental value as well. or... perhaps we should never put these incremental values into the cache at all.
8dbd49d
to
821c41d
Compare
Writing a unit test for this is possible, but now that I finally have it (monkeyd from #4674), unsure if the errors are because of the tenant harness differences or something else. |
Still trying to get the CI to pass 👍 |
Two stabs at this, by mocking a http receiver and the globals out (now reverted) and then by separating the timeline dependency and just testing what kind of events certain timelines produce. I think this pattern could work for some of our problems. Follow-up to #4822.
We want to have timeline_written_size_delta which is defined as difference to the previously sent
timeline_written_size
from the currenttimeline_written_size
.Solution is to send it. On the first round
disk_consistent_lsn
is used which is captured duringload
time. After that an incremental "event" is sent on every collection. Incremental "events" are not part of deduplication.I've added some infrastructure to allow somewhat typesafe
EventType::Absolute
andEventType::Incremental
factories per metrics, now that we have our firstEventType::Incremental
usage.