Skip to content

Vendor part of Sentry-SDK for scrubbing requests errors #13434

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

Open
wants to merge 3 commits into
base: distributed-error-reporting
Choose a base branch
from

Conversation

thesujai
Copy link
Contributor

@thesujai thesujai commented May 29, 2025

Summary

  1. vendors the sentry scrubber.py to match our own needs.
  2. Update to new Core API
  3. Address some suggestions from GSoC: Distributed error reporting #12489

References

Fixes #13395

Reviewer guidance

NA

@github-actions github-actions bot added DEV: backend Python, databases, networking, filesystem... DEV: frontend SIZE: medium labels May 29, 2025
Copy link
Contributor

Build Artifacts

@thesujai
Copy link
Contributor Author

@rtibbles cc

@MisRob MisRob requested review from bjester, rtibbles and akolson May 30, 2025 03:12
@bjester bjester self-assigned this Jun 3, 2025
@rtibbles rtibbles self-assigned this Jun 18, 2025
Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Generally, this is looking good to me. One small bit of cleanup where I think we can just use the KDS breakpoints.

I think we need to rebase the feature branch again, but easier to do that after this has been merged.

import { browser, os, device, isTouchDevice } from 'kolibri.utils.browserInfo';
import client from 'kolibri/client';
import urls from 'kolibri/urls';
import { browser, os, device, isTouchDevice, screenBreakpoint } from 'kolibri/utils/browserInfo';
Copy link
Member

Choose a reason for hiding this comment

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

I think instead of adding this separate screenBreakpoint utility here, we can use the KDS breakpoints instead.

Can probably just import:

import useKResponsiveWindow from 'kolibri-design-system/lib/composables/useKResponsiveWindow';

then in the function body do:

const { windowBreakpoint } = useKResponsiveWindow();

Just need to make sure to then reference windowBreakpoint.value when passing it into the context object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried and had a problem:

windowBreakpoint.value is always null when i try to call it from kolibri/plugins/error_reports/assets/src/utils.js

Here is what I am doing

import useKResponsiveWindow from 'kolibri-design-system/lib/composables/useKResponsiveWindow';

const {windowBreakpoint} = useKResponsiveWindow();
    

console.log('windowBreakpoint', JSON.stringify(windowBreakpoint));

I see this in console:

windowBreakpoint {"value":null}

Copy link
Member

Choose a reason for hiding this comment

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

Hrm, this is probably because we're using it outside a component, so the tracking isn't working.

"available_height": {"type": "integer", "optional": True},
},
},
"screen_breakpoint": {"type": "string", "optional": True},
Copy link
Member

Choose a reason for hiding this comment

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

If we're using the KDS breakpoints, then we can set this as a non-negative integer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: backend Python, databases, networking, filesystem... DEV: frontend SIZE: medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants