Skip to content

Commit 8bc4779

Browse files
author
Ganesh Jangir
committed
fix: various fixes
1 parent 99d95b4 commit 8bc4779

File tree

7 files changed

+16
-4
lines changed

7 files changed

+16
-4
lines changed

Cargo.lock

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

data-pipeline-ffi/src/trace_exporter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ pub unsafe extern "C" fn ddog_trace_exporter_new(
467467
}
468468

469469
if let Some(cfg) = &config.telemetry_cfg {
470-
builder.enable_telemetry(cfg.clone());
470+
builder.enable_telemetry(Some(cfg.clone()));
471471
}
472472

473473
if let Some(token) = &config.test_session_token {

data-pipeline/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ tokio = { version = "1.23", features = [
6262
"time",
6363
"test-util",
6464
], default-features = false }
65+
clap = { version = "4.3.21", features = ["derive"] }
66+
datadog-log = { path = "../datadog-log" }
6567

6668
[features]
6769
test-utils = []

data-pipeline/examples/send-traces-with-stats.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn main() {
6767
.set_language_version(env!("CARGO_PKG_RUST_VERSION"))
6868
.set_input_format(TraceExporterInputFormat::V04)
6969
.set_output_format(TraceExporterOutputFormat::V04)
70-
.enable_telemetry(telemetry_cfg)
70+
.enable_telemetry(Some(telemetry_cfg))
7171
.enable_stats(Duration::from_secs(10));
7272
let exporter = builder.build().expect("Failed to build TraceExporter");
7373
let now = UNIX_EPOCH

datadog-crashtracker/src/collector/emitters.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,31 +71,39 @@ unsafe fn emit_backtrace_by_frames(
7171
}
7272
if resolve_frames == StacktraceCollection::EnabledWithInprocessSymbols {
7373
backtrace::resolve_frame_unsynchronized(frame, |symbol| {
74+
#[allow(clippy::unwrap_used)]
7475
write!(w, "{{").unwrap();
7576
#[allow(clippy::unwrap_used)]
7677
emit_absolute_addresses(w, frame).unwrap();
7778
if let Some(column) = symbol.colno() {
79+
#[allow(clippy::unwrap_used)]
7880
write!(w, ", \"column\": {column}").unwrap();
7981
}
8082
if let Some(file) = symbol.filename() {
8183
// The debug printer for path already wraps it in `"` marks.
84+
#[allow(clippy::unwrap_used)]
8285
write!(w, ", \"file\": {file:?}").unwrap();
8386
}
8487
if let Some(function) = symbol.name() {
88+
#[allow(clippy::unwrap_used)]
8589
write!(w, ", \"function\": \"{function}\"").unwrap();
8690
}
8791
if let Some(line) = symbol.lineno() {
92+
#[allow(clippy::unwrap_used)]
8893
write!(w, ", \"line\": {line}").unwrap();
8994
}
95+
#[allow(clippy::unwrap_used)]
9096
writeln!(w, "}}").unwrap();
9197
// Flush eagerly to ensure that each frame gets emitted even if the next one fails
9298
#[allow(clippy::unwrap_used)]
9399
w.flush().unwrap();
94100
});
95101
} else {
102+
#[allow(clippy::unwrap_used)]
96103
write!(w, "{{").unwrap();
97104
#[allow(clippy::unwrap_used)]
98105
emit_absolute_addresses(w, frame).unwrap();
106+
#[allow(clippy::unwrap_used)]
99107
writeln!(w, "}}").unwrap();
100108
// Flush eagerly to ensure that each frame gets emitted even if the next one fails
101109
#[allow(clippy::unwrap_used)]

datadog-trace-utils/src/msgpack_decoder/v04/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub fn from_bytes(data: tinybytes::Bytes) -> Result<(Vec<Vec<SpanBytes>>, usize)
109109
/// let decoded_span = &decoded_traces[0][0];
110110
/// assert_eq!("test-span", decoded_span.name);
111111
/// ```
112-
pub fn from_slice(mut data: &[u8]) -> Result<(Vec<Vec<SpanSlice>>, usize), DecodeError> {
112+
pub fn from_slice(mut data: &[u8]) -> Result<(Vec<Vec<SpanSlice<'_>>>, usize), DecodeError> {
113113
let trace_count = rmp::decode::read_array_len(&mut data).map_err(|_| {
114114
DecodeError::InvalidFormat("Unable to read array len for trace count".to_owned())
115115
})?;

datadog-trace-utils/src/msgpack_decoder/v05/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ pub fn from_bytes(data: tinybytes::Bytes) -> Result<(Vec<Vec<SpanBytes>>, usize)
139139
/// let decoded_span = &decoded_traces[0][0];
140140
/// assert_eq!("", decoded_span.name);
141141
/// ```
142-
pub fn from_slice(mut data: &[u8]) -> Result<(Vec<Vec<SpanSlice>>, usize), DecodeError> {
142+
pub fn from_slice(mut data: &[u8]) -> Result<(Vec<Vec<SpanSlice<'_>>>, usize), DecodeError> {
143143
let data_elem = rmp::decode::read_array_len(&mut data)
144144
.map_err(|_| DecodeError::InvalidFormat("Unable to read payload len".to_string()))?;
145145

0 commit comments

Comments
 (0)