Skip to content

Commit

Permalink
feedback ds
Browse files Browse the repository at this point in the history
  • Loading branch information
neuronull committed Oct 6, 2023
1 parent 9e158f3 commit 0298eed
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/sinks/datadog/metrics/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,9 @@ fn generate_sketch_metadata(
) -> Option<ddmetric_proto::Metadata> {
generate_origin_metadata(maybe_pass_through, maybe_source_type, origin_product_value).map(
|origin| {
if origin.product().is_none() | origin.category().is_none() | origin.service().is_none()
if origin.product().is_none()
|| origin.category().is_none()
|| origin.service().is_none()
{
warn!(
message = "Generated sketch origin metadata should have each field set.",
Expand All @@ -427,9 +429,9 @@ fn generate_sketch_metadata(
}
ddmetric_proto::Metadata {
origin: Some(ddmetric_proto::Origin {
origin_product: origin.product().expect("OriginProduct should be set"),
origin_category: origin.category().expect("OriginCategory should be set"),
origin_service: origin.service().expect("OriginService should be set"),
origin_product: origin.product().unwrap_or_default(),
origin_category: origin.category().unwrap_or_default(),
origin_service: origin.service().unwrap_or_default(),
}),
}
},
Expand Down

0 comments on commit 0298eed

Please sign in to comment.