Skip to content

client: expose custom user-agent prefix for workflow traceability #125

Description

@goanpeca

Summary

Allow workflows to prepend a custom user-agent token to SDK requests so Backblaze support and internal logs can identify which workflow or integration generated traffic.

Why

The SDK already supports a custom userAgent prefix. The action always uses the SDK default, which identifies the SDK but not the consuming workflow, repository, product, or automation. A user-supplied token improves operational traceability without changing request behavior.

SDK support (already available)

  • B2ClientOptions.userAgent
  • SDK default user-agent contract (b2-sdk-typescript/... and package token retained)

Proposed surface

New optional input:

  • user-agent-prefix: prepended to the SDK default user-agent, e.g. my-org-release/1.2

The action should validate this as a header-safe string and continue to rely on the SDK to append its own product token.

Acceptance criteria

  • user-agent-prefix maps to B2ClientOptions.userAgent.
  • The SDK's default product tokens remain present after the prefix.
  • Invalid header characters are rejected before constructing the client.
  • Omitting the input preserves current behavior.
  • Documentation gives examples for repository/workflow traceability.

Out of scope

  • Per-command user-agent overrides.
  • Logging or exposing credentials in the user-agent value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsdk-paritySDK capability not yet exposed by the action

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions