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

Telemetry: normalize keys/values saved into JSON #9544

Open
humitos opened this issue Aug 24, 2022 · 0 comments
Open

Telemetry: normalize keys/values saved into JSON #9544

humitos opened this issue Aug 24, 2022 · 0 comments
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code

Comments

@humitos
Copy link
Member

humitos commented Aug 24, 2022

We are currently saving all the keys as-is, without any transformation. This is good for some data, but for some other, like pip packages, this makes the queries to be harder to write and expensive to execute. For example, sphinx_rtd_theme and sphinx-rtd-theme means the same for us and it would be to saved as sphinx-rtd-theme in the JSON data. Also, Sphinx and sphinx and similars.

We can achieve this at

# NOTE: we could use `object_hook` to make all the keys lowercase here
# making easier to filter the results when making queries
# https://docs.python.org/3/library/json.html#json.load
return json.loads(content)

@humitos humitos added Improvement Minor improvement to code Accepted Accepted issue on our roadmap labels Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code
Projects
Status: Planned
Development

No branches or pull requests

1 participant