googleapis / googleapis/google-cloud-go

storage: provide call context in the trace span

Open
#2,778 3 comments 0 reactions 1 assignee Assigned to @cpriti-os View on GitHub
api: storage type: feature request
Dominant language
Go
Stars
4.5k
Forks
1.6k
Avg merge
1d 13h
Merged PRs (30d)
109

Description

**Is your feature request related to a problem? Please describe.**

I'm trying to instrument the code that uses `cloud.google.com/go/storage` to access objects stored in Google Cloud Storage. Although the library already creates OpenCensus spans, the amount of information exposed about the call is insufficient for any troubleshooting.

**Describe the solution you'd like**

I'd like to propose adding more context to call spans, that would allow to distinguish between them. Such values as bucket name for bucket/object operations, the project ID would be very helpful in this regard. Besides tracking the start and end of method calls with `trace.StartSpan(ctx)`/`defer trace.EndSpan(ctx, err)` an additional call to `trace.TracePrintf()` with an attribute map carrying the context of a call would suffice.

**Describe alternatives you've considered**

My current alternative to this is wrapping every single entity that makes calls to the Storage API, creating a new span and attaching the call context. I'm happy to contribute and these changes to the upstream.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.