Skip to content

Commit d85861b

Browse files
gyuheon0hbwoebi
andauthored
fix(sidecar): include language:native tag for sidecar crashtracker (#2083)
# What does this PR do? Crashtracker crash logs can include the language tag. If included, [in the backend](https://github.com/DataDog/dd-go/blob/31428f1894713427d921abed736e6a0ce7f2fb94/trace/apps/tracer-telemetry-intake/logs_writer.go#L197), it will be used to set `Log.Ddsource`. It is also used to categorize `instrumentation-telemetry-data` crashes into `instrumentation-telemetry-data-{runtime}`. This PR sets it. # Motivation I noticed all crash logs from the sidecar are [missing source](https://app.datadoghq.com/logs?query=is_crash%3Atrue%20source%3Aunknown&agg_m=count&agg_m_source=base&agg_t=count&cols=host%2Cservice&event=AwAAAZ6UJqMO6s8cewAAABhBWjZVSnFNT0FBQUZvVlVKNFZqYlNBQUEAAAAkZDE5ZTk0MjYtYjBlOS00YmQyLTk3ZTgtZjVjNmMyYmU4YWVkAAADRg&fromUser=true&messageDisplay=inline&refresh_mode=sliding&storage=hot&stream_sort=desc&viz=stream&from_ts=1778010046228&to_ts=1780602046228&live=true) # Additional Notes Anything else we should know when reviewing? # How to test the change? Describe here in detail how the change can be validated. Co-authored-by: bob.weinand <bob.weinand@datadoghq.com>
1 parent a76412c commit d85861b

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

datadog-sidecar/src/unix.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,14 @@ fn init_crashtracker(dependency_paths: Option<*const *const libc::c_char>) -> an
281281
config_builder = config_builder.endpoint_test_token(test_token);
282282
}
283283
}
284+
let tags = vec![
285+
"is_crash:true".to_string(),
286+
"severity:crash".to_string(),
287+
format!("library_version:{}", crate::sidecar_version!()),
288+
"library:sidecar".to_string(),
289+
"language:php".to_string(),
290+
];
291+
284292
libdd_crashtracker::init(
285293
config_builder.build()?,
286294
CrashtrackerReceiverConfig::new(
@@ -294,12 +302,7 @@ fn init_crashtracker(dependency_paths: Option<*const *const libc::c_char>) -> an
294302
"libdatadog".to_string(),
295303
crate::sidecar_version!().to_string(),
296304
"SIDECAR".to_string(),
297-
vec![
298-
"is_crash:true".to_string(),
299-
"severity:crash".to_string(),
300-
format!("library_version:{}", crate::sidecar_version!()),
301-
"library:sidecar".to_string(),
302-
],
305+
tags,
303306
),
304307
)
305308
}

0 commit comments

Comments
 (0)