Skip to content
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

Exceptions should include "context details" when provided #1805

Open
jshook opened this issue Feb 5, 2024 · 4 comments
Open

Exceptions should include "context details" when provided #1805

jshook opened this issue Feb 5, 2024 · 4 comments

Comments

@jshook
Copy link
Contributor

jshook commented Feb 5, 2024

It is useful to have diagnostic data provided directly from an exception that would otherwise require a user to manually dig into related configurations or other data sources.

Examples of this:

  • The details for a database which returned an error.
  • The UTC timecode of the error.
  • Client system profile (CPUs, memory, ..)

Other details like java details, like heap utilization, etc. should generally be left out of such info, since this is properly metrics data which is provided in other places.

Because error handling mechanisms and semantics must remain robust, any mechanism which adds context to an exception must not throw any errors itself.

A new decorator type NBErrorContext should be added which indicates it can add error details in the form of a Map<String,String>. When an exception is thrown, the main error handling logic should walk the stack to find any such instances, and if present, the exception should be appended with ;; additional context: and the details of the error.

@jshook
Copy link
Contributor Author

jshook commented Feb 5, 2024

Elements which have important context for interior stack frames should be decorated with this. This includes activities, or spaces which are invoked during the execution of an operation.

@dave2wave
Copy link
Contributor

  1. Details of the tenant come from the driver. Is tenant enough for Astra or is there more metadata like region?

@dave2wave
Copy link
Contributor

  1. Can we indicate if the error is client or serverside?
  2. UTC time should always prepend the ERROR. Make it look more like an access log.

@jshook
Copy link
Contributor Author

jshook commented Feb 5, 2024

The details found in this way need to be added to the status.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants