Make exceptions reporting consistent and containing useful information

Registered by Stanislaw Pitucha on 2013-04-10

Currently failures and errors are reported in many inconsistent ways over the message queue. For example the message describing a problem can be reported in one of "payload.exception.err", "payload.reason.kwargs.reason", "payload.exception.message", "payload.exception", while the status code for web requests can be found in one of "payload.reason.kwargs.code", "payload.status", "payload.exception.status_code", "payload.exception.kwargs.code". On the other hand a lot of information is missing in case of exceptions - for example stacktraces.

There are many situations where proper exception reporting would be useful - for example collection of them into an interface like Sentry (https://getsentry.com/welcome/). Due to many possible ways of serialising stacktraces, I propose using raven/sentry format (https://sentry.readthedocs.org/en/latest/developer/interfaces/index.html#sentry.interfaces.Stacktrace). Other tools should be easy to adapt if needed.

Blueprint information

Status:
Not started
Approver:
Mark McLoughlin
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Discussion
Series goal:
None
Implementation:
Not started
Milestone target:
None

Related branches

Sprints

Whiteboard

Stan - any updates on this proposal? Do you plan to work on it? Could you post an initial sketch of what the API would look like?

See also https://blueprints.launchpad.net/oslo.messaging/+spec/notification-structured

-- @markmc

@Stan, still working on this proposal? If not, Can I help to submit some patches to make this happen? -tim 2015/3/23

Gerrit topic: https://review.openstack.org/#q,topic:bp/introduces,n,z

Addressed by: https://review.openstack.org/167194
    Introduce a new log handler to notify exceptions and tracebacks

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.