Skip to content

Feature Request: Expose metadata parameter in Storage asyncio gRPC client methods #17633

Description

@ankitaluthra1

Determine this is the right repository

  • I determined this is the correct repository in which to report this feature request.

Summary of the feature request

Currently there is no way to pass additional information from client using python-storage sdk asycio grpc client. Passing metadata per call is often necessary for providing additional client information for observability to the underlying gRPC streams. Exposing metadata in each call so upstream clients can pass necessary headers and info.

Desired code experience

fromgoogle.cloud.storage.asyncioimportStorageAsyncClientasyncdefmain():
client=StorageAsyncClient()
# Example passing custom client info metadataawaitclient.get_object(
bucket_name="my-bucket",
object_name="my-object",
metadata=(("x-goog-api-client", "test-ua/additional-info"),)
)
### Expected results_e.g. `my_new_feature()`shouldreturnFOO_### API client name and version`google-cloud-storage`### Use caseThisfeatureisusefulinobservabilityandtrackingscenarioswherecustominformation (likean`x-goog-api-client`header) needstobepassedasynchronouslyfromthepython-storageSDKdowntotheunderlyinggRPCstream.
### Additional contextIcurrentlyhaveaPRdraftedthatimplementsthisfunctionalityacross`async_grpc_client.py`, `AsyncAppendableObjectWriter`, and`AsyncMultiRangeDownloader`.

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions