-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix fetched chunk from store size in metric #8971
Fix fetched chunk from store size in metric #8971
Conversation
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
dce4cc7
to
b0c07ab
Compare
b0c07ab
to
70e578b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Nice catch!
Hello @dannykopping!
Please, if the current pull request addresses a bug fix, label it with the |
1 similar comment
Hello @dannykopping!
Please, if the current pull request addresses a bug fix, label it with the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-8971-to-release-2.7.x origin/release-2.7.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x de84737368914fa240108c0a3ef843eb5b5e4d3b
# Push it to GitHub
git push --set-upstream origin backport-8971-to-release-2.7.x
git switch main
# Remove the local backport branch
git branch -D backport-8971-to-release-2.7.x Then, create a pull request where the |
**What this PR does / why we need it**: The `Size()` function on `chunk.Chunk` calls out to `func (ChunkRef) Size() int` in the proto, which doesn't actually include the size of the chunk data! We need to call `chunk.Data.Size()` for that. (cherry picked from commit de84737)
**What this PR does / why we need it**: The `Size()` function on `chunk.Chunk` calls out to `func (ChunkRef) Size() int` in the proto, which doesn't actually include the size of the chunk data! We need to call `chunk.Data.Size()` for that. (cherry picked from commit de84737)
What this PR does / why we need it:
The
Size()
function onchunk.Chunk
calls out tofunc (ChunkRef) Size() int
in the proto, which doesn't actually include the size of the chunk data! We need to callchunk.Data.Size()
for that.Which issue(s) this PR fixes:
N/A
Special notes for your reviewer:
This will fix the
Cache.Chunk.BytesSent
stat which indicates how many chunk bytes we sent to the chunk cache. This should probably be renamed for clarity at some point; it's a little confusing.The same fix is applies to the
loki_chunk_fetcher_fetched_size_bytes{source="store"}
histogram metric.Checklist
CONTRIBUTING.md
guide (required)CHANGELOG.md
updateddocs/sources/upgrading/_index.md