Skip to content

Commit

Permalink
Add warning on unparseable namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Sushisource committed Jul 30, 2024
1 parent d696a12 commit 1a28cdc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/src/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,10 @@ macro_rules! namespaced_request {
// Attach namespace header
$req.metadata_mut().insert(
TEMPORAL_NAMESPACE_HEADER_KEY,
ns_str
.parse()
.unwrap_or_else(|_| AsciiMetadataValue::from_static("")),
ns_str.parse().unwrap_or_else(|e| {
warn!("Unable to parse namespace for header: {e:?}");
AsciiMetadataValue::from_static("")
}),
);
// Init metric labels
AttachMetricLabels::namespace(ns_str)
Expand Down

0 comments on commit 1a28cdc

Please sign in to comment.