-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(types): add profile envelope item type #6468
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
Conversation
size-limit report 📦
|
| 'internal'; | ||
| 'internal' | ||
// Profile event type | ||
| 'profile'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this change is breaking in a very unfortunate way. We use the DataCategory
type as a callback argument in a hook that can be configured by the users:
recordDroppedEvent(reason: EventDropReason, dataCategory: DataCategory, event?: Event): void; |
We essentially have two options:
- Disregard this fact under the assumption that it won't matter for many people.
- Add logic that prevents
'profile'
from being passed to this hook.
I am fine with both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disregard this fact under the assumption that it won't matter for many people
I'm in favor of this, recordDroppedEvent
is not going to be used by the 99.9% of folks, we can add a note to the changelog about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lforst yeah, I figured. As it stands today with the profiling SDK implementation, I dont think recordDroppedEvent will even be called for profiles (we just early return if sampling rate is lower than random). I think for now this is fine, but as we integrate more tightly with the SDK, we can fix this and actually pass a profile to the recordDroppedEvent if necessary
@JonasBa gonna make the scope |
@JonasBa do we have to update the |
Oh yes @AbhiPrasad, that's my bad |
Probably. Let me take a look |
Adds profile envelope type so we can skip the ts-expect error in the profiling sdk.