Skip to content

Commit

Permalink
Fix clippy fixes and remove test doc
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelff committed Jan 13, 2023
1 parent c48c15d commit 40d3dd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion query-engine/core/src/telemetry/capturing/capturer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ impl Candidate<'_, models::LogEvent> {
}

models::LogEvent {
name: name,
name,
level: "query".to_string(),
attributes: attrs,
..self.value
Expand Down
14 changes: 1 addition & 13 deletions query-engine/core/src/telemetry/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,7 @@ fn convert_to_high_res_time(time: Duration) -> HrTime {
/// Transforms an [`opentelemetry::Value`] to a [`serde_json::Value`]
/// This is because we want to flatten the JSON representation for a value, which by default will
/// be a nested structure informing of the type. For instance a float [`opentelemetry::Value`]
/// would be represented as json as:
///
/// ```
/// "value": {
/// "F64": 4.887
/// }
/// ```
///
/// But we want it to be just:
///
/// ```
/// "value": 4.887
/// ```
/// would be represented as json as `{"f64": 1.0}`. This function will flatten it to just `1.0`.
fn to_json_value(value: &Value) -> serde_json::Value {
match value {
Value::String(s) => json!(s),
Expand Down

0 comments on commit 40d3dd8

Please sign in to comment.