diff --git a/src/carnot/planner/objects/otel.cc b/src/carnot/planner/objects/otel.cc index 6408e7e649c..31ab0f394ea 100644 --- a/src/carnot/planner/objects/otel.cc +++ b/src/carnot/planner/objects/otel.cc @@ -111,8 +111,9 @@ StatusOr> ParseAttributes(DictObject* attributes) { return keyobj->CreateError("Attribute key must be a non-empty string"); } if (!ExprObject::IsExprObject(values[idx])) { - return values[idx]->CreateError("Expected column or string for attribute value, got '$0'", - QLObjectTypeString(values[idx]->type())); + return values[idx]->CreateError( + "Expr is not an Object. Expected column or string for attribute value, got '$0'", + QLObjectTypeString(values[idx]->type())); } auto expr = static_cast(values[idx].get())->expr(); if (Match(expr, ColumnNode())) { diff --git a/src/vizier/services/query_broker/controllers/query_executor.go b/src/vizier/services/query_broker/controllers/query_executor.go index 72711338927..d0fe7c5a55f 100644 --- a/src/vizier/services/query_broker/controllers/query_executor.go +++ b/src/vizier/services/query_broker/controllers/query_executor.go @@ -207,25 +207,42 @@ func (q *QueryExecutorImpl) Wait() error { // There are a few common failure cases that may occur naturally during query execution. For example, ctxDeadlineExceeded, // and invalid arguments. In this case, we do not want to unnecessarily log our error state. if strings.Contains(err.Error(), "Distributed state does not have a Carnot instance") { + log.WithField("query_id", q.queryID). + WithError(err). + Error("Distributed state does not have a Carnot instance") return err } if strings.Contains(err.Error(), "InvalidArgument") { + log.WithField("query_id", q.queryID). + WithError(err). + Error("InvalidArgument") return err } if strings.Contains(err.Error(), "failed to initialize all result tables") { + log.WithField("query_id", q.queryID). + WithError(err). + Error("failed to initialize all result tables") return err } if errors.Is(err, nats.ErrConnectionClosed) { + log.WithField("query_id", q.queryID). + WithError(err). + Error("NATS connection closed") return err } if errors.Is(err, context.DeadlineExceeded) { + log.WithField("query_id", q.queryID). + WithError(err). + Error("Context deadline exceeded") return err } + if errors.Is(err, context.Canceled) { log.WithField("query_id", q.queryID). Info("Query cancelled") return err } + log.WithField("query_id", q.queryID). WithField("duration", time.Since(q.startTime)). WithError(err).