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

ref: Add "android" and "nodejs" platforms #1563

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion crates/symbolicator-service/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ impl fmt::Display for NativePlatform {
#[derive(Debug, Clone, Copy, Deserialize, Serialize, PartialEq, Eq, Hash)]
#[serde(rename_all = "lowercase")]
pub enum JsPlatform {
// Very rarely we see frames with a platform of `"nodejs"`.
// We cover this case with an alias just to be sure.
#[serde(alias = "nodejs")]
Node,
JavaScript,
}
Expand All @@ -233,17 +236,20 @@ impl fmt::Display for JsPlatform {

/// Possible values for the platform of a JVM event.
///
/// This corresponds to the platforms listed in `java.processing._handles_frame` in Sentry.
/// This covers `"java"` (used in error events) and `"android"` (used in
/// profiling).
#[derive(Debug, Clone, Copy, Deserialize, Serialize, PartialEq, Eq, Hash)]
#[serde(rename_all = "lowercase")]
pub enum JvmPlatform {
Java,
Android,
}

impl AsRef<str> for JvmPlatform {
fn as_ref(&self) -> &str {
match self {
JvmPlatform::Java => "java",
JvmPlatform::Android => "android",
}
}
}
Expand Down
Loading