Closed raed667 closed 2 months ago
If you look at #1507, I thought the conclusion was that "Algolia for JavaScript" isn't a search UA, but just a "JS client UA". Not sure this is needed
Good catch @Haroenv i forgot about the Github issue 👀 i'll convert to draft for now and continue the discussion there.
Same comments as in the issue for me too, the UA is the whole string being sent, Algolia for JavaScript
is not scoped to the search client, the following segment defines the current client
And also, this is common to every clients, see https://github.com/algolia/api-clients-automation/blob/main/tests/output/python/tests/client/monitoring_test.py#L27 or https://github.com/algolia/api-clients-automation/blob/main/tests/output/java/src/test/java/com/algolia/client/QuerySuggestions.test.java#L52 and so on
What
The createUserAgent function shouldn't set "Algolia for JavaScript" by default. Instead, this agent should be added in the build of the Search client.
Why
How
Updated the function
createUserAgent
to accept an optional base UA as a second parameter. Recommend client can set that to an empty string, while the rest can still use the default valueAlgolia for JavaScript