Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

feat(preprocessEvent): emit preprocessEvent for profiles #198

Merged
JonasBa merged 5 commits intomainfrom
jb/feat/prepare-event
Oct 16, 2023
Merged

feat(preprocessEvent): emit preprocessEvent for profiles #198
JonasBa merged 5 commits intomainfrom
jb/feat/prepare-event

Conversation

@JonasBa
Copy link
Copy Markdown
Member

@JonasBa JonasBa commented Sep 19, 2023

Implements preprocessEvent hook implementation for profiles (counterpart to the replay PR)

@JonasBa JonasBa requested a review from mydea September 19, 2023 09:55
const profile = createProfilingEvent(cpuProfile, profiledTransaction);

if (client.emit) {
// @ts-expect-error preprocessEvent hook doesn't exist?
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Weird, any idea why this does not exist here? Should be on both the client and Badeclient types 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll check, thought it might be because the changes are not in the latest release yet

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@mydea seems like it was just ts being cryptic due to the unknown Event.

@JonasBa JonasBa force-pushed the jb/feat/prepare-event branch from 19987da to f0924d3 Compare September 19, 2023 12:19
if (client.emit && profile) {
const integrations =
// @ts-expect-error _integrations is private
typeof client._integrations === 'object' &&
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just a tip: you can use client['_integrations'] to access private fields without TS complaining.

@JonasBa JonasBa merged commit bfa7bcf into main Oct 16, 2023
@JonasBa JonasBa deleted the jb/feat/prepare-event branch October 16, 2023 14:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants