feat(storage): add CalculateChecksum spans for upload writers - #20372
Open
sahusneha2004 wants to merge 3 commits into
Open
feat(storage): add CalculateChecksum spans for upload writers#20372sahusneha2004 wants to merge 3 commits into
sahusneha2004 wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces OpenTelemetry tracing spans for CRC32C checksum calculations and verifications across both gRPC and HTTP storage clients. The feedback highlights two critical issues: first, when OTel tracing is disabled, returning the parent span from startChecksumSpan will cause endSpan to prematurely terminate the parent span, which should be resolved by returning a no-op span instead. Second, adding the len(r.buf) > 0 check to the outer condition in the gRPC writers prevents the checksum from being populated for empty buffers, altering the original behavior; the checksum should be computed unconditionally while only wrapping the calculation in a span if the buffer is non-empty.
sahusneha2004
force-pushed
the
feat/otel-writer-checksums
branch
from
August 13, 2026 08:18
b45beff to
73cdb20
Compare
sahusneha2004
force-pushed
the
feat/otel-writer-checksums
branch
from
August 17, 2026 10:16
73cdb20 to
0f19584
Compare
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.
Storage.CalculateChecksumspans during single-shot HTTP uploads when verifying client-side CRC against the server-returned CRC.Storage.CalculateChecksumspans during one-shot and resumable gRPC chunk writes.storage/trace_test.go.