You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AbstractGoogleClient warns about application name not being set #1062
I'm hitting this problem by using SQLAdmin with the builder, without setting application name by calling SQLAdmin.Builder(...).setApplicationName("app-name"), you'll see a warning coming from AbstractGoogleClient saying:
"Application name is not set. Call Builder#setApplicationName."
What's the purpose of setting application name? I don't see it being documented. If it's not needed, the warning should be removed.
Sets the application name to be used in the UserAgent header of each request or null for none.
This is an UserAgent header example which is received when you use the API userAgent: "{application name} Google-API-Java-Client Google-HTTP-Java-Client/1.22.0 (gzip)"
Thanks @NicolaSpreafico for the pointer. The javadoc still doesn't explain why it's important to set it. It might be used for metrics, but as an API user, how does it affect me? @garrettjonesgoogle PTAL
This doesn't really affect you. In general API providers use that header to do all sorts of things and it is not uncommon for it to be required by REST APIs.
Activity
NicolaSpreafico commentedon Aug 24, 2017
The purpose of setting the application name can be understood by the javadoc
https://google.github.io/google-api-java-client/releases/1.21.0/javadoc/com/google/api/client/googleapis/services/AbstractGoogleClient.Builder.html#setApplicationName(java.lang.String)
This is an
UserAgentheader example which is received when you use the APIuserAgent: "{application name} Google-API-Java-Client Google-HTTP-Java-Client/1.22.0 (gzip)"meltsufin commentedon Aug 24, 2017
Thanks @NicolaSpreafico for the pointer. The javadoc still doesn't explain why it's important to set it. It might be used for metrics, but as an API user, how does it affect me?
@garrettjonesgoogle PTAL
mattwhisenhunt commentedon Oct 19, 2017
This doesn't really affect you. In general API providers use that header to do all sorts of things and it is not uncommon for it to be required by REST APIs.