feat: client side tracing upload path#545
Open
hweawer wants to merge 2 commits intofeat/tracing-httputil-infrastructurefrom
Open
feat: client side tracing upload path#545hweawer wants to merge 2 commits intofeat/tracing-httputil-infrastructurefrom
hweawer wants to merge 2 commits intofeat/tracing-httputil-infrastructurefrom
Conversation
3ac9e8f to
f1c7884
Compare
Anton-Kalpakchiev
approved these changes
Feb 2, 2026
| if err := t.originCluster.UploadBlob(ctx, namespace, d, blob); err != nil { | ||
| t.failureStats.Counter("upload_blob").Inc(1) | ||
| span.RecordError(err) | ||
| span.SetStatus(codes.Error, "upload failed") |
Collaborator
There was a problem hiding this comment.
considering we will be trying to debug which part of the upload failed, does it make sense to enrich this err message?
| // UploadBlob uploads blob to origin cluster. See Client.UploadBlob for more details. | ||
| func (c *clusterClient) UploadBlob(namespace string, d core.Digest, blob io.ReadSeeker) (err error) { | ||
| func (c *clusterClient) UploadBlob(ctx context.Context, namespace string, d core.Digest, blob io.ReadSeeker) (err error) { | ||
| ctx, span := otel.Tracer("kraken-origin-cluster").Start(ctx, "cluster.upload_blob", |
Collaborator
There was a problem hiding this comment.
considering the normal client's tracer is called kraken-origin-client, wouldnt it make sense to call this one kraken-origin-cluster-client?
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.
Summary
Implement end-to-end distributed tracing for Docker blob upload paths in Kraken, enabling observability from proxy → origin. This PR adds OpenTelemetry instrumentation to the client upload flow with hierarchical span creation and trace context propagation.
Motivation
Debugging slow or failed Docker pushes currently requires piecing together logs across multiple services with no correlation. This PR enables: