Skip to content

Add a Diffgram user agent to the S3 storage clients #1633

Description

@goanpeca

Summary

shared/data_tools_core_s3.py and shared/data_tools_core_minio.py construct their boto3 clients without a user_agent_extra, so object store operators see Diffgram's S3 traffic as generic boto3 traffic. That makes it hard to attribute request volume, throttling, or listing load to Diffgram when a user asks their storage provider for help.

Proposal

Pass config=Config(user_agent_extra='diffgram/<version>') when constructing the clients in both modules, resolving the version from the existing DIFFGRAM_VERSION_TAG environment variable with a safe fallback so it cannot raise at construction time.

user_agent_extra appends to the standard botocore user agent rather than replacing it, so the existing Boto3/... botocore/... string is preserved.

This applies equally to Amazon S3 and to any other implementation of the S3 API that Diffgram's connectors can target, including the MinIO connector path.

Scope

Two files, additive only, no configuration changes and no new dependencies. I have a working branch and can open a PR referencing this issue.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions