googleapis / googleapis/google-cloud-rust

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

Open
#5,997 0 comments 0 reactions 1 assignee Claimed by @xlai20 View on GitHub
api: storage priority: p3 type: feature request
Dominant language
Rust
Stars
955
Forks
144
Avg merge
1d 5h
Merged PRs (30d)
279

Description

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.

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.