fix builder documentation_size metric, improve build_time - #3533
Merged
Merged
Conversation
syphar
force-pushed
the
fix-doc-stats
branch
from
September 17, 2026 12:58
30db1f1 to
d128b6c
Compare
syphar
marked this pull request as ready for review
September 17, 2026 13:35
Member
Author
GuillaumeGomez
approved these changes
Sep 17, 2026
Member
|
Nice, thanks! I'm sure there is a way to init the const slices without having to write all values by hand but don't have time to think about it right now. Maybe later. =D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Looking at datadog, I realized the documentation-size is broken:

Some digging shows that is since #3009 / 2682ed4 (november 2025!), where we started using buckets defined as MiB, where we still reported bytes... :(
To fix that, I first switched
ArchiveStatisticsto useByteSize, same asfinish_releaseandfinish_buildSo it's clearer what is reported, and the decision how to store is done in
docs_rs_database.DOCUMENTATION_SIZE_BUCKETSare also now defined withByteSize, and reporting thedocumentation_sizeis only done via a small helper method (takingByteSizeof course). That should make mistakes much harder in this area. I fixed the metric unit to what the opentelemetry semantic conventions define.The
crate_detailswe fetch for our web handlers now also useByteSizefor explicitness.While I was on it, I did the same for the
build_timemetric.