-
Notifications
You must be signed in to change notification settings - Fork 116
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
Allow overriding the default User-Agent header #356
Comments
I think that it is a good idea (and already good practice in other databases) to have a simple option to set application name. My preference would be to represent it as one string with documentation saying that it should distinguish applications that connect to the same InfluxDB. The same option should be better present in all InfluxDB clients (python, java, js ...). It is already possible to customize anything in the request, including User-Agent, see #314. |
I think that is fine. Also, maybe setting the application name should be required? That would break backwards compatibility but would be a simple update for clients and would encourage a best practice. |
Ok. When an application name will be set, it will be added to the end of the current UA string. E.g.: |
I don't love breaking a ton of users for this - maybe an annoying log message if the application name is unset would be enough? |
Also an example of how to set custom headers with |
👍 That's exactly what I wanted to propose - a warning message to set application. |
jfyi... the Mongo uses |
Proposal:
Add a feature allowing users of this client library to override the default
influxdb-client-go
User-Agent HTTP header. This would make it easier to understand which apps are making which requests. E.g., currently, if App1 and App2 use this client, the UA coming from both will readinfluxdb-client-go
. Allowing the apps to override the UA would make it easier to distinguish between the two.Current behavior:
User-Agent header is hard coded to
influxdb-client-go
Desired behavior:
Add 2 options for users:
influxdb-client-go/2.3 AppName/Version
. Mark this in the docs as recommended.The text was updated successfully, but these errors were encountered: