-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CT-1268] [Spike] Integrate dbt exceptions into structured logging system #5958
Comments
Copying from Nate's comment in #4836 (comment), because the underlying thrust of it continues to feel important:
Basically, when a dbt run fails, how can we tell whether it was user error, database error, or internal dbt error? In a Pythonic world, we'd expect to do this via class inheritance and type introspection. Given that our log events are now proto-composed, we probably need a field on each exception-log. Something like
|
This can probably be accomplished with an enum that defines all the categories. Without verifying the syntax I think something like this would work: enum ExceptionCause {
{
PARSING = 0;
DISALLOWED = 1;
DATABASE_CONNECTION = 2;
DATABASE_QUERY = 3;
UNHANDLED = 4;
...
} And then within the message add message SomeException {
EventInfo info = 1;
repeated ExceptionCause exception_cause = 2;
...
} This also allows the flexibility to add more types to the end of the enum which I'm sure we'll end up needing. |
Blocking question we need to answer: Should we have separate (Idea with |
One of the unknowns here is exactly what would be useful to consumers to get logged. We likely don't want to log all exceptions, just specific ones. Is it best to fire an event as part of those exceptions or where the exception is raised? Another option would be to add more structured information to Minimum: Better:
|
After chatting about this with @isaac-taylor, this might get us a lot of what we need, at least in the medium-term. It would be a quality-of-life improvement over parsing the string
|
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Right now we have structured logging events for the majority of our logging, except for exceptions. In some but not all cases we have a separate logging event. Ideally all exceptions should be logged automatically. This ticket is labeled a "spike" because in order to scope this work we need to identify a mechanism/policies for doing this.
The text was updated successfully, but these errors were encountered: