Closed ssmith-pc closed 5 months ago
Something else to keep in mind is we would like to track usage of SDKs coming from our own higher-level tools in addition to external integration partners. For example,
This doesn't change a ton about the general strategy, but it makes me think having partner
in the name of these params isn't quite right.
We should also reevaluate some of the cruft that's currently being passed in the user-agent strings. I've been here for a year and never had a need to know anything about what urllib3 version was in use.
We should also reevaluate some of the cruft that's currently being passed in the user-agent strings. I've been here for a year and never had a need to know anything about what urllib3 version was in use.
That's good to know that there isn't much relying on what's there currently. Would be nice to identify the high value information we'd like to capture and include.
I can understand how it could be helpful to know what http client/version is being used to access the service, particularly if there is a known bug with a particular version that causes trouble for our service, as this would likely help CS triage and help.
This doesn't change a ton about the general strategy, but it makes me think having
partner
in the name of these params isn't quite right.
Agree we should capture those clients, but I do wonder if we should try to keep the partner info separate. A lot of that depends on what we end up doing in the back-end, like how this info is extracted and matched up to what's in our partner CRM, etc.
In addition to setting the source_*
fields, we could include a separate flag in our clients that identifies it as an internally owned integration.
FYI there is a minimal unit test file called tests/unit/utils/test_user_agent.py
that you may want to expand with a few more test cases to make sure the resulting string looks reasonable across a handful of different normalization cases.
FYI there is a minimal unit test file called
tests/unit/utils/test_user_agent.py
that you may want to expand with a few more test cases to make sure the resulting string looks reasonable across a handful of different normalization cases.
I was working on that concurrently with your comment -- just pushed
Problem
Need to allow clients to include a
source_tag
to identify the source of their requests.Solution
Allow clients to specify a
source_tag
field in the client constructor, that will be used to identify the traffic source, if applicable.Example:
This would cause the user-agent to get a value like:
Type of Change
Testing