Introduction
Every Tyk component writes an Application Log, capturing internal events of the system, such as health-checks, status, configuration changes, and errors, which are typically used for monitoring and debugging. Example- verbosity: which severity levels are written
- format: the structure and content of each entry
- log output: where logs are sent, for example to a third-party aggregator
OpenTelemetry Trace and Span IDs
Gateway Only When OpenTelemetry tracing is enabled, Tyk Gateway automatically injectstrace_id and span_id fields into all request-scoped application log entries, including middleware execution, error handling, and debug output. This lets you correlate an application log line with the corresponding span in your distributed trace.
Tracking HTTP 404 Errors
Gateway Only By default, requests that do not match any configured API listen path return HTTP 404 and are not logged. Because these requests never enter the proxy pipeline, they are not recorded in Access Logs or API Traffic Logs, which only cover requests that are routed and processed by the Gateway. To track them in the application log, settrack_404_logs to true in tyk.conf (or the equivalent environment variable).
When enabled, a log entry is written at error level for each unmatched request.
From Tyk Gateway 5.14.0, the entry includes a host field when using the text or json log format. Because Tyk Gateway exposes both a proxy API and a control API, and these can be configured on a separate hostname and port, the host field identifies which one received the unmatched request:
legacy format, the host field is omitted: