From 906ef9cba32aa6a7d69ca142a737e2b1b743d336 Mon Sep 17 00:00:00 2001 From: Philip Lykke Carlsen Date: Thu, 2 Nov 2023 14:43:44 +0100 Subject: [PATCH 1/2] Log errors that occur during /explain --- crates/connectors/ndc-postgres/src/connector.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/connectors/ndc-postgres/src/connector.rs b/crates/connectors/ndc-postgres/src/connector.rs index c399571c9..da2662185 100644 --- a/crates/connectors/ndc-postgres/src/connector.rs +++ b/crates/connectors/ndc-postgres/src/connector.rs @@ -134,6 +134,15 @@ impl connector::Connector for Postgres { let conf = &configuration.as_runtime_configuration(); explain::explain(conf, state, query_request) .await + .map_err(|err| { + tracing::error!( + meta.signal_type = "log", + event.domain = "ndc", + event.name = "Explain error", + body = %err + ); + err + }) .map(Into::into) } From 87397efe60c5717957d3c85db4b16f4bd93cad50 Mon Sep 17 00:00:00 2001 From: Philip Lykke Carlsen Date: Thu, 2 Nov 2023 23:22:34 +0100 Subject: [PATCH 2/2] `error = true` is recognised by Honeycomb. --- crates/connectors/ndc-postgres/src/connector.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/connectors/ndc-postgres/src/connector.rs b/crates/connectors/ndc-postgres/src/connector.rs index da2662185..066365869 100644 --- a/crates/connectors/ndc-postgres/src/connector.rs +++ b/crates/connectors/ndc-postgres/src/connector.rs @@ -139,7 +139,9 @@ impl connector::Connector for Postgres { meta.signal_type = "log", event.domain = "ndc", event.name = "Explain error", - body = %err + name = "Explain error", + body = %err, + error = true, ); err })