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

feat: Add native crash reporter #795

Merged
merged 5 commits into from
May 6, 2022
Merged

feat: Add native crash reporter #795

merged 5 commits into from
May 6, 2022

Conversation

loewenheim
Copy link
Contributor

This adds an optional native crash reporter modeled on relay-crash.
Sentry can use, modify, copy, and redistribute this contribution, under Sentry's choice of terms.

Note: the code of symbolicator-crash is identical to that of relay-crash (modulo such things as version numbers and descriptions). In principle there's no reason it couldn't be extracted into its own crate.

This adds an optional native crash reporter modeled on `relay-crash`.
@loewenheim loewenheim requested a review from a team May 4, 2022 13:44
@@ -0,0 +1,3 @@
[submodule "crates/symbolicator-crash/sentry-native"]
path = crates/symbolicator-crash/sentry-native
url = https://github.com/getsentry/sentry-native
Copy link
Contributor

Choose a reason for hiding this comment

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

oh no, do does this force us to use submodules? i really don't get on with them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fraid so. I guess extracting this into its own crate would also save symbolicator from this fate?

fn main() {
// sentry-native dependencies
match std::env::var("CARGO_CFG_TARGET_OS").unwrap().as_str() {
"macos" => println!("cargo:rustc-link-lib=dylib=c++"),
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't support symbolicator on mac do we? not that it does any harm. and as you say perhaps better as a separate crate at some point

// we never need a debug build of sentry-native
.profile("RelWithDebInfo")
// always build breakpad regardless of platform defaults
.define("SENTRY_BACKEND", "breakpad")
Copy link
Contributor

Choose a reason for hiding this comment

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

how does breakpad work? will it work correctly in our k8s setup?

Copy link
Member

@jan-auer jan-auer May 6, 2022

Choose a reason for hiding this comment

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

If this is built exactly the same way as relay-crash, then yes. However, this also needs something similar to: https://github.com/getsentry/ops/pull/4158. We have the volume, but we need the config.

@codecov-commenter
Copy link

Codecov Report

Merging #795 (dd99615) into master (dd01a36) will decrease coverage by 0.17%.
The diff coverage is 52.38%.

@@            Coverage Diff             @@
##           master     #795      +/-   ##
==========================================
- Coverage   75.37%   75.19%   -0.18%     
==========================================
  Files          49       51       +2     
  Lines       10861    10945      +84     
==========================================
+ Hits         8186     8230      +44     
- Misses       2675     2715      +40     
Impacted Files Coverage Δ
crates/symbolicator-crash/src/lib.rs 2.50% <2.50%> (ø)
crates/symbolicator-crash/build.rs 97.67% <97.67%> (ø)
crates/symbolicator/src/config.rs 85.33% <100.00%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd01a36...dd99615. Read the comment docs.

@loewenheim loewenheim merged commit 712fa5f into master May 6, 2022
@loewenheim loewenheim deleted the feat/crash-reporter branch May 6, 2022 11:55
josb pushed a commit to josb/symbolicator that referenced this pull request Jun 6, 2022
feat: Add native crash reporter

This adds an optional native crash reporter modeled on `relay-crash`.
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.

5 participants