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

Backport changes to v7 #10617

Merged
merged 8 commits into from
Feb 13, 2024
Merged

Backport changes to v7 #10617

merged 8 commits into from
Feb 13, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Feb 12, 2024

Backporting some PRs to v7:

As pointed out here, and I also did notice that myself, it is not super
nice - as you need to provide a generic integration to
`getIntegrationByName`, which is annoying to do in a type safe way, esp.
if you want to avoid deprecations:

```ts
const client = getClient();
const replay = client && client.getIntegrationByName && client.getIntegrationByName<ReturnType<typeof replayIntegration>>('Replay');
```

So IMHO a small utility `Sentry.getReplay()` is not unreasonable for
this 🤔
@mydea mydea self-assigned this Feb 12, 2024
@mydea mydea changed the title feat(replay): Add getReplay utility function (#10510) Backport changes to v7 Feb 12, 2024
Copy link
Contributor

github-actions bot commented Feb 12, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 78.42 KB (+0.81% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 69.64 KB (+0.87% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 73.58 KB (+0.84% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 63.26 KB (+0.97% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 33.6 KB (+1.13% 🔺)
@sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 33.48 KB (+1.06% 🔺)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.37 KB (+0.69% 🔺)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.37 KB (+0.7% 🔺)
@sentry/browser - Webpack (gzipped) 22.63 KB (+0.91% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 76.69 KB (+0.86% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 68.18 KB (+0.92% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 34.01 KB (+1.41% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 24.99 KB (+1.46% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 214.8 KB (+0.97% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 102.6 KB (+1.22% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 74.89 KB (+1.45% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 37.14 KB (+0.97% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 70.01 KB (+0.87% 🔺)
@sentry/react - Webpack (gzipped) 22.67 KB (+0.94% 🔺)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 87.68 KB (+0.68% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 51.87 KB (+3.02% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 17.22 KB (+0.67% 🔺)

cleptric and others added 4 commits February 12, 2024 10:17
Co-authored-by: Abhijeet Prasad <aprasad@sentry.io>
We didn't properly await sourcemaps flattening via sorcery before proceeding to
upload them. The reason is that the async callbacks in `forEach` weren't
awaited. A `for` loop is the better approach here. Wondering if we
should lint against async `forEach` callbacks.
This behaviour could have caused various inconsistencies. My suspicion
is that the timing worked _well enough_ in most cases but we definitely
want to properly await this step.

Thanks to @MSDev201 for bringing this up!

Unfortunately this likely won't fix #10589 as a whole :(
Add the Http 400 avoidance logic from our server-side `load`
function instrumentation to the client-side wrapper. Didn't know that
these errors were a thing on the client side but now that we know, we
definitely don't want to capture them.

Co-authored-by: Francesco Novy <francesco.novy@sentry.io>
Add an `exports` field to the `package.json` for
`@sentry/angular-ivy`. While it seems like regular Angular apps didn't
need it, tools like `vitest` expect the field as soon as `type:
"module"` is specified.

---

Co-authored-by: Andrei Alecu <aandrei03@gmail.com>
@mydea mydea marked this pull request as ready for review February 12, 2024 16:17
Lms24 and others added 2 commits February 13, 2024 14:13
Add exports for our semantic attributes keys
from the SDK packages so that users don't have to install `@sentry/core`
explicitly.
…#10633)

This should make using these much easier:

* add a default `op` to the spans, so users don't need to specify them.
* Return the created span (or undefined), ensuring users don't need to
do all the checking for op etc. themselves.

Also make some small adjustments to ember & angular instrumentation to
leverage some of these changes.
@mydea mydea force-pushed the fn/backport-to-v7 branch from dd31fdb to 88cc758 Compare February 13, 2024 13:13
@mydea mydea merged commit 551e401 into v7 Feb 13, 2024
@mydea mydea deleted the fn/backport-to-v7 branch February 13, 2024 13:28
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.

4 participants