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

Upgrade to Sentry 0.24 and use public SystemTime #10

Merged
merged 2 commits into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ debug-logs = []
breakpad-handler = { version = "0.1.0", path = "./breakpad-handler" }
crossbeam = "0.8.0"
parking_lot = "0.11"
sentry-core = { version = "0.23", features = ["client"] }
sentry-core = { version = "0.24", features = ["client"] }
serde_json = "1.0"

[workspace]
Expand Down
6 changes: 3 additions & 3 deletions src/breakpad_integration.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use sentry_core::{protocol as proto, types};
use std::path::Path;
use sentry_core::protocol as proto;
use std::{path::Path, time::SystemTime};

pub use breakpad_handler::InstallOptions;

Expand Down Expand Up @@ -59,7 +59,7 @@ impl BreakpadIntegration {
// We want to set the timestamp here since we aren't actually
// going to send the crash directly, but rather the next time
// this integration is initialized
timestamp: types::Utc::now(),
timestamp: SystemTime::now(),
// This is the easiest way to indicate a session crash update
// in the same envelope with the crash itself. :p
exception: vec![proto::Exception {
Expand Down
4 changes: 2 additions & 2 deletions src/shared.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use sentry_core::{protocol as proto, types};
use std::path::Path;
use std::{path::Path, time::SystemTime};

pub(crate) fn assemble_envelope(md: CrashMetadata, minidump_path: &Path) -> proto::Envelope {
let mut envelope = proto::Envelope::new();
Expand All @@ -14,7 +14,7 @@ pub(crate) fn assemble_envelope(md: CrashMetadata, minidump_path: &Path) -> prot
.ok()
.and_then(|md| md.created().ok().map(|st| st.into()))
})
.unwrap_or_else(types::Utc::now);
.unwrap_or_else(SystemTime::now);

// An event_id is required, so if we were unable to get one from the .metadata
// we just use the guid in the filename of the minidump
Expand Down