openedx / openedx/edx-django-utils
Reduce monitoring noise from large third party cookies
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 28
- Forks
- 31
- Avg merge
- 7d 6h
- Merged PRs (30d)
- 1
Description
Context
We have a few large cookies in our cookie headers that we are pretty sure we're not going to be able to get rid of or make smaller, mostly from third parties. They may be diverting attention from other large cookies we can fix or remove.
Proposal
Split the cookie size calculations into ones that factor in these third party cookies and ones that don't.
Implementation details:
Add a new COOKIE_LOGGING_IGNORE_LIST setting that takes a list of prefixes
Add a new COOKIE_HEADER_WITH_EXCLUSIONS_SIZE_LOGGING_THRESHOLD setting (needs a better name)
Split the large cookie header logging code into two parts:
- If the total size is over COOKIE_HEADER_SIZE_LOGGING_THRESHOLD, log everything
- Otherwise, check the size of the header excluding cookies matching those in COOKIE_LOGGING_IGNORE_LIST
- If the new size is over COOKIE_HEADER_WITH_EXCLUSIONS_SIZE_LOGGING_THRESHOLD, log everything except the cookies that were ignored
- Add a new custom attribute for the new size
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the large cookie header logging code and the existing cookie size settings. Trace how cookie prefixes, thresholds, and custom attributes are represented, then verify the total-size and exclusion-size paths with the project's existing tests. Done means ignored third-party cookies reduce monitoring noise while both threshold cases log the intended cookie details.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100