aws / graph-explorer

React-based web application that enables users to visualize both property graph and RDF data and explore connections between data without having to write graph queries.
https://github.com/aws/graph-explorer
Apache License 2.0
314 stars 46 forks source link

[Feature Request] Improved logging for troubleshooting (2024 Roadmap item) #299

Closed AndreaNassisi closed 3 days ago

AndreaNassisi commented 4 months ago

Community Note

Is your feature request related to a problem? Please describe. The current Graph Explorer logging lacks of coverage and verbosity to enable troubleshooting issues. This is affecting the support operations enterprise deployments on Neptune Notebook and self-hosted instances.

Describe the solution you'd like Logging need to cover:

  1. the system information in which the Graph Explorer is deployed
  2. the log of the Node.js startup
  3. the startup of the Graph Explorer processes on Node.js
  4. The user connections
  5. The user database schema loading
  6. The user queries, not the resulting data
  7. The user visualization settings

Additional context [TBD] Log lifecycle [TBD] integration with AWS services like CloudWatch

kmcginnes commented 4 months ago

We'll also want to make sure unhandled exceptions are properly logged, and investigate what is possible to log when the process is shutting down unexpectedly.

kmcginnes commented 3 days ago

Nearly all of the proposed solution has been covered. Here is a breakdown:

1. the system information in which the Graph Explorer is deployed

This was not done because we ran out of time and Graph Explorer is typically hosted within a Docker container running on a Neptune Notebook EC2 instance. Also, the specs of the Docker container are rarely important to diagnosing the issue.

It does come up occasionally, so I hope we can revisit this one in the future.

2. the log of the Node.js startup
3. the startup of the Graph Explorer processes on Node.js

The Express.js startup process is now logging out more information.

6. The user queries, not the resulting data

The database queries can now be logged to the server log stream. This is optional and off by default. If turned on, each database request that flows through the proxy server will be logged to the server's log stream (i.e. the terminal, Docker, or CloudWatch).

4. The user connections
5. The user database schema loading
7. The user visualization settings

These can be gathered by using the "Save Configuration" option in settings. This provides a full backup copy of the client configuration data in a JSON file. This can be provided for support and will include the connections, styles, any synced schemas, and any additional settings.