Skip to content

Commit

Permalink
default origin enrichment configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
rayz committed Feb 3, 2025
1 parent bb77a12 commit c384611
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/saluki-components/src/sources/dogstatsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ pub struct DogStatsDConfiguration {
enable_payloads_sketches: bool,

/// Configuration related to origin detection and enrichment.
#[serde(default)]
origin_enrichment: OriginEnrichmentConfiguration,

/// Workload provider to utilize for origin detection/enrichment.
Expand Down
11 changes: 11 additions & 0 deletions lib/saluki-components/src/sources/dogstatsd/origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ pub struct OriginEnrichmentConfiguration {
origin_detection_optout: bool,
}

impl Default for OriginEnrichmentConfiguration {
fn default() -> Self {
Self {
entity_id_precedence: false,
tag_cardinality: default_tag_cardinality(),
origin_detection_unified: false,
origin_detection_optout: default_origin_detection_optout(),
}
}
}

pub(super) struct DogStatsDOriginTagResolver {
config: OriginEnrichmentConfiguration,
workload_provider: Arc<dyn WorkloadProvider + Send + Sync>,
Expand Down

0 comments on commit c384611

Please sign in to comment.