Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packet CLI does not set an identifying User-Agent #55

Closed
displague opened this issue Jun 15, 2020 · 0 comments · Fixed by #60
Closed

Packet CLI does not set an identifying User-Agent #55

displague opened this issue Jun 15, 2020 · 0 comments · Fixed by #60

Comments

@displague
Copy link
Member

displague commented Jun 15, 2020

What problem are you facing?

As users of Packet tools, API usage by these tools should be visible to Packet. We understand that this kind of information can lead to recognition and better support for specific tools. Support could come in the form of developer time on front-end or back-end aspects of the tools, addressing bugs, adding features, or improving performance.

How can packet-cli help?

All API consumers should be instrumented with an appropriate User-Agent. The UA is included in HTTP calls to the Packet API. The precise User-Agent used in each tool will differ to some degree. The expected components of a UA should include the name and version of the tool itself as well as the primary plugins and libraries contributing to the tool's operation.

For example,
https://github.com/packethost/packet-cli/blob/master/cmd/cli.go#L29 could benefit from a cli.Client.UserAgent assignment. In this case, the name and version of the CLI and the name and version of packngo should be included.

User-Agent: packet-cli/0.0.8 packngo/0.0.2

This may benefit from packngo exposing the version to consumers or exposing functions like SetUserAgent or PrependUserAgent that enhances the visibility of related tools.

displague added a commit to displague/metal-cli that referenced this issue Jul 1, 2020
displague added a commit to displague/metal-cli that referenced this issue Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant