sentry-native
sentry-native copied to clipboard
Crashpad custom transport
We've managed to keep our codebase clean from openssl for a while now, but unfortunately, using sentry-native's crashpad backend forces us to have the development libs installed on linux, even when we are using a custom transport. I don't know how hard it would be (not super familiar with the crashpad codebase), but having the ability to disable all of the HTTP transport code in crashpad_handler and change sentry-native to allow it to read the crash database created by crashpad so that it could invoke whatever custom transport was being used to do the upload would be really nice to have.
(I had thought there was already an issue open about this but I couldn't find it)
Can somebody please confirm my understanding of this issue? Is it the case that when you set a custom transport in Sentry, that has no effect on Crashpad, which does it's own uploading of minidumps in its own process? I had previously assumed that Crashpad's own uploading was switched off and that the sentry library handled all communication with Sentry servers.
If so, is this also the case for the inproc and Brakepad backends? I have a need to run Sentry through GRPC instead of HTTP, including crash reports.
Is it the case that when you set a custom transport in Sentry, that has no effect on Crashpad, which does it's own uploading of minidumps in its own process?
Yes, exactly! Crashpad does its own uploading, out-of-process, at the time of the crash, using its own transport code. inproc and breakpad are uploading from within the process, on restart, using the configured transport.
thanks @Swatinem!
Maybe it would make sense to link crashpad statically to whatever SSL lib is preferrable?
(Just came here because I need to switch sentry-unreal to a docker-based to support older GLIBC and of course the images I wanted to use don't provide openssl-dev...)
I am sorry, @vaind, I forgot to respond. With 0.6.0 on Linux, there is no longer a direct dependency on OpenSSL
because we switched to the upstream preferred libcurl
transport. So TLS connections will use whatever the loaded libcurl
was built with. I overlooked that we still use find_package(OpenSSL)
in the top-level crashpad build config, which I will rectify today and add to the next release.
I also talked with @bitsandfoxes about the issue you were having with the build, and I think you could have bypassed the switch to a Docker-based image. It wasn't new Native SDK needs that introduced the ABI changes, but the (silently) switched toolchain through the bump of ubuntu-latest
to 22.04
. If you have any problems with the Native SDK in the downstream integration or builds, please tag me directly next time.
I will still leave this issue open because while the trigger for it was the (unnecessary) OpenSSL dependency (which is now gone), it essentially asks to bypass the crashpad transport altogether and provide a mechanism to persist the minidump to disk and then use the custom transport in the Native SDK to upload. This isn't yet implemented, and I am unsure if we will go down that road soon. @Jake-Shadle, do you still need this?
@supervacuus Nope, we rewrote everything in Rust so we have full control https://github.com/rust-minidump/minidump-writer