Skip to content

FR: Support Custom Headers (HTTP & gRPC) in GCS Client #5997

Description

@xlai20

Add support for injecting custom HTTP headers into Google Cloud Storage (GCS) SDK requests. This is primarily used for advanced debugging, distributed tracing (e.g., X-Client-Tracking-Id), and custom middlebox routing.

Requirements:

  • Global Client Configuration: Allow developers to configure custom headers when instantiating the storage client (e.g., adding with_custom_headers to ClientBuilder in google_cloud_storage and updating ClientConfig in google_cloud_gax).
  • Method/Request-Level Configuration: Allow custom headers to be specified on specific API calls to supplement or override the client-level headers.
  • Transport Support: Changes must apply to both HTTP (reqwest) and gRPC (tonic) transports within google_cloud_gax_internal.

For more details on the use cases for this feature, please refer to the Google Cloud documentation: https://docs.cloud.google.com/storage/docs/troubleshooting#custom-headers.

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions