Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(spans): Filter DB spans for MongDB queries #2520

Merged
merged 3 commits into from
Sep 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Match also on system tag
  • Loading branch information
phacops committed Sep 18, 2023
commit a7c692b4db661d12581cdb3a7eeb5e6a64d95aa2
17 changes: 13 additions & 4 deletions relay-dynamic-config/src/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use relay_base_schema::data_category::DataCategory;
use relay_common::glob2::LazyGlob;
use relay_common::glob3::GlobPatterns;
use relay_sampling::condition::{
AndCondition, EqCondition, GlobCondition, NotCondition, RuleCondition,
AndCondition, EqCondition, GlobCondition, NotCondition, OrCondition, RuleCondition,
};
use serde_json::Value;

Expand Down Expand Up @@ -64,9 +64,18 @@ pub fn add_span_metrics(project_config: &mut ProjectConfig) {
value: Value::String("db.sql.query".into()),
options: Default::default(),
}),
RuleCondition::Glob(GlobCondition {
name: "span.description".into(),
value: GlobPatterns::new(vec![r#"*"$*"#.into()]),
RuleCondition::Or(OrCondition {
inner: vec![
RuleCondition::Eq(EqCondition {
name: "span.system".into(),
value: Value::String("mongodb".into()),
options: Default::default(),
}),
RuleCondition::Glob(GlobCondition {
name: "span.description".into(),
value: GlobPatterns::new(vec![r#"*"$*"#.into()]),
}),
],
}),
],
})),
Expand Down