The TrackJS-Node agent provides handlers that can be injected into the Express pipeline. The request middleware should be added first to setup the context and the error middleware should be added last to catch any errors.
Agent metadata and telemetry is isolated between requests. For example, a console.log message written during a request to /foo won’t appear on errors captured from /bar. This enables you to add request-specific metadata to requests.