Hello. I would like to propose creating schemas for error reports, stack traces, call stacks, stack frames, and related concepts.
A motivating use case is enabling and enhancing AI-related scenarios via JSON-LD representations of systems' states and contexts. There are several other interesting uses to consider; some are indicated below.
Firstly, there are Web scenarios to consider such as embedding JSON-LD representations of systems' states and error messages in <script> element data blocks within HTML resources.
<html> <head> <script type="application/ld+json"> { ... } </script> </head> <body> <p>Hello world!</p> </body> </html>
Secondly, today, developers and end-users can share error-report data in Web-based discussion forums. This sharing often involves copying and pasting formatted text output by software systems for these systems' developers to make use of.
What if software systems' states and error messages could be output into, processed into, and/or pasted into standard machine-readable formats or schema?
Perhaps new software tools could, then, be created to enhance technical communication, enabling the indexing of, searching for, retrieval of, analysis of, and visualization of these data.
Perhaps, resembling Mermaid diagrams on GitHub, developers and end-users could paste systems' states and error messages into markdown code blocks for convenient formatting and visualization features.
```state { ... } ```
```error { ... } ```
Thirdly, having a standard means of representing systems' states and error messages would enhance a number of protocols, e.g., MCP, which include error-handling capabilities, enabling or enhancing the exchange of systems' states between AI agents and/or systems' other components.
Fourthly, software system observability can be delivered by using telemetry solutions (e.g., OpenTelemetry). These solutions enable developers to mark, make, measure, and transmit spans, traces, logs, and metrics to observers. Schemas for representing systems' states would enhance observability scenarios.
Fifthly, having a standard means of representing systems' states and error messages would enhance software development, testing, and debugging scenarios, e.g., remote debugging.
Sixthly, many software systems overwise only capable of being viewed as "black boxes" could have their states snapshotted during execution, either manually or automatically. Software systems could be paused, have their states obtained, and then be resumed without there needing to have been an error.
Seventhly, as software systems and their stateful subsystems can be distributed across multiple computers, new schemas for systems' states and error messages would simplify the exchange, gathering, and collation of these data for such distributed systems. This would be useful, in particular, for distributed systems comprised of software components or services from multiple vendors.
See Also
- https://www.w3.org/TR/trace-context-1/ – the W3C Trace Context Recommendation.
- https://mcpcat.io/guides/error-handling-custom-mcp-servers/ – discusses error handling in MCP.
- Web Context WICG/proposals#188 – ideas for representing state and context in business processes and/or workflows.