googleapis / nodejs-storage

Node.js client for Google Cloud Storage: unified object storage for developers and enterprises, from live data serving to data analytics/ML to data archiving.
https://cloud.google.com/storage/
Apache License 2.0
897 stars 369 forks source link

fix: add user-agent header to transfer manager and resumable upload #2334

Closed ddelgrosso1 closed 10 months ago

ddelgrosso1 commented 10 months ago

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

Fixes # 🦕

danielduhh commented 10 months ago

@ddelgrosso1 could you please add the "why" context to the PR description, or link to a bug?

ddelgrosso1 commented 10 months ago

The rationale for this PR is that currently in certain situations (transfer manager, resumable uploads) user-agent is not being set by this library. Instead the auth library sets user-agent. This is causing incorrect attribution of metrics to versions of storage that do not exist, i.e. (9.0.0, 9.1.0). This PR should fix this attribution problem.