Skip to content

feat(storage): add resource span attributes for ACO ( App Centric Observability )#16119

Merged
bajajneha27 merged 30 commits into
googleapis:mainfrom
bajajneha27:509338299
Jul 21, 2026
Merged

feat(storage): add resource span attributes for ACO ( App Centric Observability )#16119
bajajneha27 merged 30 commits into
googleapis:mainfrom
bajajneha27:509338299

Conversation

@bajajneha27

Copy link
Copy Markdown
Contributor

No description provided.

@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label May 27, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a private helper method EnrichSpan to populate OpenTelemetry span attributes (gcp.resource.destination.id and gcp.resource.destination.location) using bucket metadata upon successful bucket operations (such as creation, retrieval, updates, and locking). It also adds corresponding unit tests to verify these attributes. The review comments suggest making EnrichSpan static since it does not access member variables, and checking for an uninitialized project number (value 0) to avoid generating invalid resource IDs.

Comment thread google/cloud/storage/internal/tracing_connection.cc
Comment thread google/cloud/storage/internal/tracing_connection.h Outdated
@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.28353% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.28%. Comparing base (fd956fb) to head (fb53265).

Files with missing lines Patch % Lines
.../cloud/storage/internal/tracing_connection_test.cc 95.73% 9 Missing ⚠️
google/cloud/storage/grpc_plugin.cc 57.14% 3 Missing ⚠️
...oogle/cloud/storage/internal/tracing_connection.cc 99.10% 2 Missing ⚠️
...le/cloud/storage/internal/bucket_metadata_cache.cc 98.24% 1 Missing ⚠️
google/cloud/storage/internal/grpc/stub.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #16119    +/-   ##
========================================
  Coverage   92.27%   92.28%            
========================================
  Files        2218     2221     +3     
  Lines      206654   207186   +532     
========================================
+ Hits       190699   191203   +504     
- Misses      15955    15983    +28     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bajajneha27
bajajneha27 force-pushed the 509338299 branch 3 times, most recently from b9d9575 to 53127d4 Compare June 3, 2026 08:09
@bajajneha27
bajajneha27 force-pushed the 509338299 branch 2 times, most recently from c978382 to ab9f016 Compare June 9, 2026 10:56
@bajajneha27
bajajneha27 marked this pull request as ready for review June 9, 2026 15:26
@bajajneha27
bajajneha27 requested review from a team as code owners June 9, 2026 15:26
Comment thread google/cloud/storage/internal/tracing_connection.cc Outdated
Comment thread google/cloud/storage/internal/bucket_metadata_cache.cc Outdated
Comment thread google/cloud/storage/internal/tracing_connection.cc Outdated
Comment thread google/cloud/storage/internal/tracing_connection.cc Outdated
Comment thread google/cloud/storage/internal/tracing_connection.cc
@kalragauri
kalragauri requested a review from cpriti-os June 10, 2026 09:39
Comment thread google/cloud/storage/internal/bucket_metadata_cache.h
TracingConnection::TracingConnection(std::shared_ptr<StorageConnection> impl)
: impl_(std::move(impl)) {}
: impl_(std::move(impl)),
background_threads_(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to always create an instance of BackgroundThreads. If the user has set the GrpcBackgroundThreadsFactoryOption they would expect the value of that Option to be used without creating another BackgroundThreads internally.

Comment thread google/cloud/storage/grpc_plugin.cc
Comment thread google/cloud/storage/internal/tracing_connection.cc Outdated
Comment thread google/cloud/storage/internal/tracing_connection.cc Outdated
Comment thread google/cloud/storage/internal/tracing_connection.cc Outdated
Comment thread google/cloud/storage/internal/tracing_connection.cc Outdated
@bajajneha27

Copy link
Copy Markdown
Contributor Author

/gcbrun

1 similar comment
@bajajneha27

Copy link
Copy Markdown
Contributor Author

/gcbrun

Comment thread google/cloud/storage/internal/bucket_metadata_cache.h
Comment thread google/cloud/storage/internal/tracing_connection.cc
@bajajneha27

Copy link
Copy Markdown
Contributor Author

@scotthart I've addressed review comments. Can you please take another look at it?

@bajajneha27
bajajneha27 merged commit 6935c82 into googleapis:main Jul 21, 2026
62 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants