fix(sidecar): prevent panic when set_metadata not yet called#1581
fix(sidecar): prevent panic when set_metadata not yet called#1581
Conversation
acdef31 to
720c214
Compare
Clippy Allow Annotation ReportComparing clippy allow annotations between branches:
Summary by Rule
Annotation Counts by File
Annotation Stats by Crate
About This ReportThis report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1581 +/- ##
=======================================
Coverage 70.82% 70.83%
=======================================
Files 423 423
Lines 61862 61862
=======================================
+ Hits 43816 43818 +2
+ Misses 18046 18044 -2
🚀 New features to boost your workflow:
|
BenchmarksComparisonBenchmark execution time: 2026-02-17 16:00:30 Comparing candidate commit 4a40274 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 56 metrics, 2 unstable metrics. scenario:single_flag_killswitch/rules-based
CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
Group 14
Group 15
Group 16
Group 17
Group 18
Group 19
BaselineOmitted due to size. |
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
set_request_config can create a default ActiveApplication via or_default() and call update_remote_config before set_metadata has been invoked, causing a panic on the .expect() calls for env, service_name, and app_version. Guard with an early return instead.
720c214 to
4a40274
Compare
|
@bwoebi Feel free to close this if you're gonna handle the root cause for the crash |
What does this PR do?
set_request_config can create a default ActiveApplication via or_default() and call update_remote_config before set_metadata has been invoked, causing a panic on the .expect() calls for env, service_name, and app_version. Guard with an early return instead.
Motivation
Crash reported with
Process panicked with message \"set_metadata was called before\"Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.