A year ago I had to patch its package for an internal use case. Their codebase is fairly well-written I thought (at least the JS SDK).
e.g. this is where they add the `fetch` breadcrumb https://github.com/getsentry/sentry-javascript/blob/develop/...
e.g. where the actual monkey patching happens https://github.com/getsentry/sentry-javascript/blob/e1783a65...