Logging
Effective logging makes it easier to trace requests and debug issues.
Logging Requirements:
- JSON Log Format: Logs should be written in JSON format. This enables easier integration with centralized logging and search systems (e.g., ELK Stack, Splunk, Loki).
- The header
x-b3-traceid(trace ID) should be logged to therequest_idfield. This allows tracking the full path of a request through different services (distributed tracing). - The header
x-request-idshould be logged to theunique_idfield. This provides a unique identifier for each specific request entering the connector.
Logging these headers allows you to track all events end to end – from NSPS, through the connector, to the external system.
For more information, refer to the NSPS request headers.