Add missing logs from query-engine-node-api
@@ -31,12 +31,17 @@ impl Logger {
enable_metrics: bool,
enable_tracing: bool,
) -> Self {
- let is_user_facing = filter_fn(telemetry::helpers::user_facing_filter);
+ let is_sql_query = filter_fn(|meta| {
+ meta.target() == "quaint::connector::metrics" && meta.fields().iter().any(|f| f.name() == "query")
+ });
+
+ // is a mongodb query?
+ let is_mongo_query = filter_fn(|meta| meta.target() == "mongodb_query_connector::query");
// We need to filter the messages to send to our callback logging mechanism
let filters = if log_queries {
// Filter trace query events (for query log) or based in the defined log level
- is_user_facing.or(log_level).boxed()
+ is_sql_query.or(is_mongo_query).or(log_level).boxed()
} else {
// Filter based in the defined log level
FilterExt::boxed(log_level)
