-
Notifications
You must be signed in to change notification settings - Fork 125
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
chore: set platform on stack frame #1495
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size Change: +154 B (+0.01%) Total Size: 2.89 MB
ℹ️ View Unchanged
|
@@ -33,6 +33,7 @@ export type StackLineParserFn = (line: string) => StackFrame | undefined | |||
export type StackLineParser = [number, StackLineParserFn] | |||
|
|||
export interface StackFrame { | |||
lang: string |
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 think this is same as platform
(and useful to re-use imo when we extend because s£ntry SDKs should populate this)
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.
Hmm good point. The docs aren't super clear
This can override the platform for a single frame. Otherwise, the platform of the event is assumed. This can be used for multi-platform stack traces, such as in React Native.
My worry with platform is that it ends up populating something like "iPadOS", in which case we don't know whether it is a Swift or Objective-C frame 🤔
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.
Looking through the code it seems like platform
is set to the language or something like node
. In our instance the "platform" values are only ever javascript
or python
.
Will rename this and go with platform
to maintain consistency but use serde to map from platform to lang when deserializing
Changes
We need to know what language an individual frame is so that we can avoid an untagged enum switching as part of the Rust service.
For now this assumes all stacks in the JS SDK are
javascript