refactor: add debug logging for meta queries
@@ -18,7 +18,7 @@ use generated_types::{
ReadWindowAggregateRequest, StringValuesResponse, TagKeyMetaNames, TagKeysRequest,
TagValuesRequest, TimestampRange,
};
-use observability_deps::tracing::{error, info};
+use observability_deps::tracing::{error, info, trace};
use predicate::predicate::PredicateBuilder;
use query::exec::{
fieldlist::FieldList, seriesset::converter::Error as SeriesSetError, ExecutionContextProvider,
@@ -214,6 +214,8 @@ where
let span_ctx = req.extensions().get().cloned();
let read_filter_request = req.into_inner();
+ println!("REQUEST {:?}", &read_filter_request);
+
let db_name = get_database_name(&read_filter_request)?;
info!(%db_name, ?read_filter_request.range, predicate=%read_filter_request.predicate.loggable(), "read filter");
@@ -735,6 +737,7 @@ where
.map(|name| name.bytes().collect())
.collect();
+ trace!(measurement_names=?values.iter().map(|k| String::from_utf8_lossy(k)).collect::<Vec<_>>(), "Measurement names response");
Ok(StringValuesResponse { values })
}
@@ -786,10 +789,8 @@ where
// Map the resulting collection of Strings into a Vec<Vec<u8>>for return
let values = tag_keys_to_byte_vecs(tag_keys);
- // Debugging help: uncomment this out to see what is coming back
- // info!("Returning tag keys");
- // values.iter().for_each(|k| info!(" {}", String::from_utf8_lossy(k)));
+ trace!(tag_keys=?values.iter().map(|k| String::from_utf8_lossy(k)).collect::<Vec<_>>(), "Tag keys response");
Ok(StringValuesResponse { values })
}
@@ -842,10 +843,7 @@ where
.map(|name| name.bytes().collect())
.collect();
- // Debugging help: uncomment to see raw values coming back
- //info!("Returning tag values");
- //values.iter().for_each(|k| info!(" {}", String::from_utf8_lossy(k)));
-
+ trace!(tag_values=?values.iter().map(|k| String::from_utf8_lossy(k)).collect::<Vec<_>>(), "Tag values response");
Ok(StringValuesResponse { values })
}
@@ -1004,6 +1002,7 @@ where
.map_err(|e| Box::new(e) as _)
.context(ListingFields { db_name })?;
+ trace!(field_names=?field_list, "Field names response");
Ok(field_list)
}
