GeezerVison is showing github.com — feat: introductory beta level support for OpenTelemetry tracing on c.g.c.storage.Storage methods by sydney-munro · Pull Request #2837 · googleapis/java-storage
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Conversation
sydney-munro
commented
Dec 6, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Introducing OpenTelemetry Tracing
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
* feat: Add OpenTelemetry to GRPC
* adding rpc.system value
* refactor test for both transports
* lint
* add branch protection rules to otel feature branch
* pr comment
* feat: Instrument HTTP Reads and Writes
* feat: instrument HTTP readAllBytes
* feat: Instrument HTTP createFrom
* make exception handling more generic
* feat: Instrument Reader and Writer methods
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
… in method modification (#2856)
Refactor com.google.cloud.storage.Storage otel tracing to be based on a decorating instance of Storage rather than modifying the implementations of StorageImpl and GrpcStorageImpl directly.
This simplifies things by ensuring any otel tracing for c.g.c.s.Storage is implemented for both http and grpc at the same time and with the same metadata.
As a side effect, the previous com.google.cloud.storage.otel package has been removed.
The number of lines appears daunting, however a high level overview of the actual modifications:
1. Remove otel tracing from StorageImpl
2. Remove otel tracing from GrpcStorageImpl
3. Cleanup StorageOption
1. classes to specify `@BetaApi` on all otel related methods
2. Add `{Http,Grpc}StorageDefaults.getDefaultOpenTelemetry` default which points at `OpenTelemetry.noop()`
3. Relax dependency on OpenTelemetrySdk to only OpenTelemetry
4. Add OtelStorageDecorator (~1700 Lines of the PR) to decorate nearly all public api methods (excluding batch())
* Each method is "logicless" for the most part, and was generated with the help of IntelliJ live templates
* Each method is generally: Define span, and scope invoke delegate catch any exception and complete the span
* There are sub decorators for ReadChannel, WriteChannel, BlobWriteSession and CopyWriter which carry the originating span along for their lifetimes
5. Remote `com.google.cloud.storage.otel` package and helpers
6. Update assertions in ITOpenTelemetryTest to be wrapped in an `assertAll`
BenWhitehead
changed the title
feat: OpenTelemetry Trace Support
feat: introductory beta level support for OpenTelemetry tracing on c.g.c.storage.Storage methods
Jan 6, 2025
Reviewers
1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
api: storage
Issues related to the googleapis/java-storage API.
size: xl
Pull request size is extra large.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|