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

from google.cloud.storage.asyncio import StorageAsyncClient

async def main():
    client = StorageAsyncClient()
    
    # Example passing custom client info metadata
    await client.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()` should return FOO_


### API client name and version

`google-cloud-storage`

### Use case

This feature is useful in observability and tracking scenarios where custom information (like an `x-goog-api-client` header) needs to be passed asynchronously from the python-storage SDK down to the underlying gRPC stream.

### Additional context

I currently have a PR drafted that implements this functionality across `async_grpc_client.py`, `AsyncAppendableObjectWriter`, and `AsyncMultiRangeDownloader`.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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