devfile / api

Kube-native API for cloud development workspaces specification
Apache License 2.0
257 stars 61 forks source link

Action logging on registry viewer server deployment #1052

Open michael-valdron opened 1 year ago

michael-valdron commented 1 year ago

Which area this feature is related to?

/area registry /area registry-viewer

Which functionality do you think we should add?

Why is this needed? Is your feature request related to a problem?

Creating a logging of actions of the registry viewer Next.js server process would help debug problems which occur as well as provide an improved understanding of the process' status.

Detailed description: Currently the Next.js server process which serves the registry viewer does have an active console log to report warnings and errors when they occur, however, actions on the server such as requests and responses are not logged in this console log as of writing. Having actions logged would provide improved debugging and status checks of deployments. One can correlate the error being reported to the action which triggers the error.

Describe the solution you'd like

A solution to this would produce in the process console a log similar to what is seen with the index server process:

[GIN] 2023/03/09 - 21:17:50 | 200 | 24.987818ms | 127.0.0.1 | GET "/devfiles/go"
[GIN] 2023/03/09 - 21:17:50 | 200 | 86.851955ms | 192.168.130.1 | GET "/viewer/_next/data/whUnq-l7IGSgRlE-_2rng/devfiles/devfile-registry/go.json?devfile-registry=devfile-registry&devfile=go"
[GIN] 2023/03/09 - 21:17:50 | 200 | 3.524242ms | 192.168.130.1 | GET "/viewer/favicon.ico"
[GIN] 2023/03/09 - 21:17:59 | 200 | 54.225µs | 10.217.0.1 | GET "/health"
[GIN] 2023/03/09 - 21:17:59 | 200 | 47.759µs | 10.217.0.1 | GET "/health"
[GIN] 2023/03/09 - 21:17:59 | 200 | 14.78621ms | 127.0.0.1 | GET "/v2index/all?icon=base64"
[GIN] 2023/03/09 - 21:17:59 | 200 | 18.567356ms | 127.0.0.1 | GET "/v2index/all?icon=base64"
[GIN] 2023/03/09 - 21:18:09 | 200 | 40.235µs | 10.217.0.1 | GET "/health"
[GIN] 2023/03/09 - 21:18:09 | 200 | 34.902µs | 10.217.0.1 | GET "/health"
[GIN] 2023/03/09 - 21:18:09 | 200 | 25.430076ms | 127.0.0.1 | GET "/v2index/all?icon=base64"
[GIN] 2023/03/09 - 21:18:09 | 200 | 31.216955ms | 127.0.0.1 | GET "/v2index/all?icon=base64"

Describe alternatives you've considered

Continue to use the register viewer process only logging errors and warnings.

Additional context

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 60 days.