Skip to content

Commit b107f56

Browse files
committed
chore(deps): bump to libdatadog v35 crashtracker (#130)
* Bump to libdatadog v35 crashtracker * enable wasm pack bulk memory ops
1 parent 4d88ca4 commit b107f56

8 files changed

Lines changed: 73 additions & 27 deletions

File tree

Cargo.lock

Lines changed: 59 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/crashtracker/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ path = "src/bin/receiver.rs"
1414

1515
[dependencies]
1616
anyhow = "1"
17-
libdd-crashtracker = { git = "https://github.com/DataDog/libdatadog.git", tag = "v29.0.0" }
17+
libdd-crashtracker = { git = "https://github.com/DataDog/libdatadog.git", tag = "v35.0.0" }
1818
napi = { version = "2", features = ["serde-json"] }
1919
napi-derive = { version = "2", default-features = false }
2020
rustls = { version = "*", default-features = false, features = ["aws-lc-rs"] }
21+
serde_json = "1"

crates/crashtracker/src/lib.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,9 @@ fn apply_default_signals(
1111
config: libdd_crashtracker::CrashtrackerConfiguration,
1212
) -> libdd_crashtracker::CrashtrackerConfiguration {
1313
if config.signals().is_empty() {
14-
libdd_crashtracker::CrashtrackerConfiguration::new(
15-
config.additional_files().clone(),
16-
config.create_alt_stack(),
17-
config.use_alt_stack(),
18-
config.endpoint().clone(),
19-
config.resolve_frames(),
20-
vec![], // Empty vec will be replaced with default_signals() in new() in libdatadog
21-
Some(config.timeout()),
22-
config.unix_socket_path().clone(),
23-
config.demangle_names(),
24-
)
25-
.unwrap()
14+
let mut value = serde_json::to_value(&config).unwrap();
15+
value["signals"] = serde_json::to_value(libdd_crashtracker::default_signals()).unwrap();
16+
serde_json::from_value(value).unwrap()
2617
} else {
2718
config
2819
}

crates/datadog-js-zstd/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@ wasm-bindgen = "0.2.100"
1111
zstd = "0.13.3"
1212
js-sys = "0.3.77"
1313

14+
[package.metadata.wasm-pack.profile.release]
15+
wasm-opt = ["-O", "--enable-bulk-memory"]
16+
1417
[dev-dependencies]
1518
wasm-bindgen-test = "0.3.50"

crates/library_config/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ wasm-bindgen = "0.2.100"
1414
serde = { version = "1.0", features = ["derive"] }
1515
serde-wasm-bindgen = "0.4"
1616

17+
[package.metadata.wasm-pack.profile.release]
18+
wasm-opt = ["-O", "--enable-bulk-memory"]
19+
1720
[dev-dependencies]
1821
wasm-bindgen-test = "0.3.50"
1922

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "1.85.0"
2+
channel = "1.87.0"
33
profile = "minimal"
44
components = ["clippy", "rustfmt", "rust-src"]

test/crashtracker/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const timeout = setTimeout(() => {
3838

3939
let currentTest
4040

41-
app.use(bodyParser.json())
41+
app.use(bodyParser.json({ limit: '10mb' }))
4242

4343
app.post('/telemetry/proxy/api/v2/apmtelemetry', (req, res) => {
4444
res.status(200).send()

test/crashtracker/test-utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const crashtracker = libdatadog.load('crashtracker')
66
function initTestCrashtracker () {
77
crashtracker.init({
88
additional_files: [],
9+
collect_all_threads: true,
910
create_alt_stack: true,
1011
use_alt_stack: true,
1112
endpoint: {

0 commit comments

Comments
 (0)