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

Use a custom user agent when issuing HTTP requests. #43

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

cipherself
Copy link
Contributor

@cipherself cipherself commented Mar 6, 2024

Description

This PR introduces adds a User-Agent header to HTTP requests made from the API clients, this will allow us to identify which requests originate from the SDK.

The User-Agent follows the format defined here.

This PR doesn't have GDPR implications as there's no personal data used and the user agent cannot be used to identify a specific user or clusters of users.

References

@cipherself cipherself self-assigned this Mar 6, 2024
Copy link

github-actions bot commented Mar 6, 2024

Coverage results

This is the coverage report for commit 0bba863

Name                                                                                Stmts   Miss  Cover   Missing
-----------------------------------------------------------------------------------------------------------------
.tox/py/lib/python3.12/site-packages/enlyze/__init__.py                                 4      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/api_clients/base.py                        70      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/api_clients/production_runs/client.py      20      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/api_clients/production_runs/models.py      52      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/api_clients/timeseries/client.py           19      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/api_clients/timeseries/models.py           43      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/auth.py                                    13      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/client.py                                 108      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/constants.py                                8      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/errors.py                                   3      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/iterable_tools.py                           7      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/models.py                                 110      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/schema.py                                  26      0   100%
.tox/py/lib/python3.12/site-packages/enlyze/validators.py                              38      0   100%
-----------------------------------------------------------------------------------------------------------------
TOTAL                                                                                 521      0   100%

4 empty files skipped.

@cipherself cipherself marked this pull request as ready for review March 6, 2024 15:04
@cipherself cipherself requested review from a team, daniel-k and denizs and removed request for a team March 6, 2024 15:04
Copy link
Member

@daniel-k daniel-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, that's a very good idea! What I especially like about this is that we'll be able to track the SDK versions that are used in the wild 👍

@cipherself cipherself merged commit e62466a into master Mar 7, 2024
9 checks passed
@cipherself cipherself deleted the minor/custom-user-agent branch March 7, 2024 08:11
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 this pull request may close these issues.

2 participants