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

build(profiling-node): make sure debug build plugin is used (#10534) #11315

Closed
wants to merge 162 commits into from

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented Mar 27, 2024

Fixes #10525

When writing the rollup config, we didn't include the debug build
plugin. This led to things not be replaced properly as profiling-node
bundles everything into a single file.

This was also causing issues in our CI:
https://github.com/getsentry/sentry-javascript/actions/runs/7804351046/job/21287026518?pr=10527

Backporting this fix to v7 so we can do a 7.100.1 release after we
merge this in.

AbhiPrasad and others added 30 commits February 7, 2024 09:28
Fixes #10525

When writing the rollup config, we didn't include the debug build
plugin. This led to things not be replaced properly as `profiling-node`
bundles everything into a single file.

This was also causing issues in our CI:
https://github.com/getsentry/sentry-javascript/actions/runs/7804351046/job/21287026518?pr=10527

Backporting this fix to v7 so we can do a `7.100.1` release after we
merge this in.
In CI currently on develop, we are stuck in a situation where we don't
build bindings which means that the e2e tests always fail.

Let's only run the profiling e2e tests whenever we change bindings, and
make it a little more liberal for when we do run CI for changing
bindings.
…10536)

We are creating a replay breadcrumb when user feedback was submitted,
however, the it was not typed correctly, which the timestamp not being
included in the proper location.
This was apparently left over from some in-between state, users should
actually use `spanToJSON(span)` there to get attributes.

Backporting this (#10604 ) 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 🤔
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 <[email protected]>
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 <[email protected]>
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.
Updates the changelog for v7.101.0.

Note, we need to also pick the changelog updates onto develop (also
7.100.x changes) after we published.
Lms24 and others added 25 commits March 12, 2024 15:10
…ng (#11085)

Adds INP span instrumentation to the old `BrowserTracing` integration.
`@sentry/types` does not align with `@sentry/core`, and it causes build
errors when `exactOptionalPropertyTypes` is `true`.

This patch fixes the type error by explicitly specifying `undefined`.
…gainst empty metric value

Adds more interaction event entry names to the INP handler, and
distinguish op between click, hover, drag, and press.
Also adds a check to `metric.value` to drop any spans that would have
empty exclusive time
…es not sending INP spans (#11183)

Fixes scenarios where interaction tracking wasn't properly recording up
to 10 candidate INP interactions.
Fixes `first-input` interaction not always tracked as INP candidates.
Fixes INP candidates not always using the longest latency even in their
interaction id grouping.

Also fixes: #11156
…ers (#11210)

Backport two additional default error event filters to our
`inboundFilters` integration:

* #10845 
* #11208
The `cron` package uses `timeZone`, while Sentry internally uses
`timezone`. This caused Sentry cron jobs to be incorrectly upserted with
no time zone information. Because of the use of the `...(timeZone ? {
timeZone } : undefined)` idiom, TypeScript type checking did not catch
the mistake.

I kept `cron`'s `timeZone` capitalization within Sentry's
instrumentation and changed from the `...(timeZone ? { timeZone } :
undefined)` idiom so TypeScript could catch mistakes of this sort.
(Passing an undefined `timezone` appears to be okay, because Sentry's
`node-cron` instrumentation does it.)
…le (#11287)

Backport of #11153

From the OP (h/t @soerface):

This introduces an option `isRequiredLabel`, and I planned to also add
`errorMessageText`.

However, this PR is branched off from a version that is a couple days
old. Right now, @c298lee is currently working on getsentry/sentry#63749,
which is causing major changes and the current version on master doesn't
work yet. Therefore, I didn't yet implement `errorMessageText`.

So consider this PR as a PoC, and either feel free to tag me when the
screenshot changes are done – then I'll redo the changes based on the
version that supports screenshots – or add the option on your own;
however you prefer 🙂

---------

Co-authored-by: Soeren Wegener <[email protected]>
* fix(canvas): createImageBitmap throws when canvas size is 0
* fix: fixes several cases where we access an undefined value
* fix: Incorrect parsing of functional pseudo class css selector
@billyvg billyvg force-pushed the feat-replay-bump-rrweb-2.12.0-v7 branch from c3c5c9c to 161dae9 Compare March 27, 2024 15:05
@billyvg billyvg closed this Mar 27, 2024
@billyvg billyvg deleted the feat-replay-bump-rrweb-2.12.0-v7 branch March 27, 2024 15:05
@billyvg billyvg restored the feat-replay-bump-rrweb-2.12.0-v7 branch March 27, 2024 15:06
@billyvg billyvg deleted the feat-replay-bump-rrweb-2.12.0-v7 branch March 27, 2024 15:06
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.

@sentry/profiling-node: ReferenceError: __DEBUG_BUILD__ is not defined