diff --git a/query-engine/core/src/telemetry/capturing/capturer.rs b/query-engine/core/src/telemetry/capturing/capturer.rs index ed3a044db627..8d696f984de7 100644 --- a/query-engine/core/src/telemetry/capturing/capturer.rs +++ b/query-engine/core/src/telemetry/capturing/capturer.rs @@ -179,7 +179,7 @@ impl Candidate<'_, models::LogEvent> { } models::LogEvent { - name: name, + name, level: "query".to_string(), attributes: attrs, ..self.value diff --git a/query-engine/core/src/telemetry/models.rs b/query-engine/core/src/telemetry/models.rs index 57ddd2afdecb..03536ee9857a 100644 --- a/query-engine/core/src/telemetry/models.rs +++ b/query-engine/core/src/telemetry/models.rs @@ -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),