Skip to content

Event-observer http server logging improvements #2158

@zone117x

Description

@zone117x

The fastify http event server used for observing events from stacks-core needs improved logging. Some logs we had when using Express also no longer show up.

Request completed log

The "request completed" log line isn't very useful by itself. It includes a randomly generated requestID that must be matched against a previous log entry to get the useful details url, request body size, etc.

Example of existing log line:

{"level":"info","time":"2024-10-23T10:24:32.995Z","pid":1,"hostname":"604488d07dce","name":"stacks-node-event","reqId":"req-i3","res":{"statusCode":200},"responseTime":4.694499969482422,"msg":"request completed"}

Unexpected connection termination logging

Log an error/warning when the stacks-node submits an http request and then terminates the http connection before we have replied. Currently there aren't useful logs for when this happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions