FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: update grpc client side metrics detection to be graceful when not running on gcp by BenWhitehead · Pull Request #3097 · googleapis/java-storage · GitHub

fix: update grpc client side metrics detection to be graceful when not running on gcp - #3097

Merged
BenWhitehead merged 1 commit into
mainfrom
fix/grpc-metrics-graceful
May 8, 2025
Merged

fix: update grpc client side metrics detection to be graceful when not running on gcp#3097
BenWhitehead merged 1 commit into
mainfrom
fix/grpc-metrics-graceful

Conversation

Copy link
Copy Markdown
Collaborator

Refactor OpenTelemetryBootstrappingUtils to return a channel configurator function rather than mutating a passed in value.

Add ChannelConfigurator interface to make testing easier and to simplify composition with any existing channel configurator function present in the InstantiatingGrpcChannelProvider.

…t running on gcp

Refactor OpenTelemetryBootstrappingUtils to return a channel configurator function rather than mutating a passed in value.

Add ChannelConfigurator interface to make testing easier and to simplify composition with any existing channel configurator function present in the InstantiatingGrpcChannelProvider.
BenWhitehead requested a review from a team May 7, 2025 19:56
product-auto-label Bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/java-storage API. labels May 7, 2025

cojenco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks Ben!

Comment on lines +104 to +107
if (projectId == null && detectedProjectId == null) {
log.warning(
"Unable to determine the Project ID in order to report metrics. No gRPC client metrics will be reported.");
return channelConfigurator != null ? channelConfigurator : ChannelConfigurator.identity();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

qq: is this the case of not running on GCP?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

In a round about manner yes. The metrics reporting relies on application default credentials for initialization, and if the project can't be determined either as a passed in value from the Storage client, or resolved from the GCP resolved otel attributes there isn't any way to bootstrap.

BenWhitehead merged commit 10cd32d into main May 8, 2025
BenWhitehead deleted the fix/grpc-metrics-graceful branch May 8, 2025 15:35
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

Labels

api: storage Issues related to the googleapis/java-storage API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL