Skip to content

Commit 40ab604

Browse files
fix(trace-stats): default env to "unknown-env" when empty
The CSS spec requires the env field to never be empty, defaulting to "unknown-env" if not configured. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 503573b commit 40ab604

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

libdd-data-pipeline/src/stats_exporter.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ fn encode_stats_payload(
159159
) -> pb::ClientStatsPayload {
160160
pb::ClientStatsPayload {
161161
hostname: meta.hostname.clone(),
162-
env: meta.env.clone(),
162+
env: if meta.env.is_empty() {
163+
"unknown-env".to_string()
164+
} else {
165+
meta.env.clone()
166+
},
163167
version: meta.app_version.clone(),
164168
runtime_id: meta.runtime_id.clone(),
165169
sequence,

0 commit comments

Comments
 (0)