Skip to main content
Request and response messages coming to the API Proxy are logged by being sent to the API Proxy Traffic Log Connectors in the environment where the API Proxy is deployed. This logging process is part of the message processing process. Log records contain two types of data:
  1. The first of these is metric data. Storing metric data is not optional.
  2. The second consists of records made up of header (header), parameter (parameter), and body (body) fields that form the contents in these 4 regions of request and response messages transmitted in the order: Client → API Proxy, API Proxy → Backend API, Backend API → API Proxy, API Proxy → Client. Which of these fields will be in the log records can be determined according to need or based on the log server’s resource consumption.
By default, log fields in all message regions of the project are active. Although all log fields are active by default, it may be preferred to disable Body fields, especially in Production Environments, to prevent log data from growing excessively.

Regions Where Log Records Are Kept

API Proxy messages can be logged in the following regions:

Request from Client

Request messages coming from client to API Proxy

Request to Target

Request messages transmitted from API Proxy to Backend API

Response from Target

Response messages given from Backend API to API Proxy

Response to Client

Response messages sent from API Proxy to client
By default, logging of fields in all message regions of the project is active. Logged fields can be restricted according to need or based on the log server’s resource consumption.

Production Environment Recommendations

Recommendations for Production Environment: It is recommended to disable logging of the following regions in production environment.
Since all policies’ settings and tests are completed in API Proxies running in production environment, no development will be done. To prevent data from growing excessively in the database, logging of the following regions can be disabled:
  • Request to Target: Requests transmitted from API Proxy to Backend API
  • Response from Target: Responses given from Backend API to API Proxy
Not writing header, parameter, and body data in these two regions helps keep the database size under control.

Logging in Error Cases

Automatic Logging in Error Cases: Even if all logging fields are closed, if an error occurs in the request, all log fields are automatically recorded to detect the error. This feature can be turned on and off in general settings.

Formdata Requests

Formdata Requests: Due to variable data sizes and data formats, file parts of formdata requests are not logged in any way. Only other metadata fields are logged.

WebSocket and gRPC Requests

WebSocket and gRPC: Since WebSocket and gRPC requests are kept as data coming to Apinizer and data going out from Apinizer, only 2 regions exist in these types of API Proxies:
  • Request from Client / Response to Client
  • Request to Target / Response from Target

Log Settings Screen

API Proxy-based log settings can be made on the log settings screen. If integration settings have been made, which API Proxies’ traffic records will be sent to these integration targets can also be configured. These settings apply not only to Elasticsearch but also to all connector types such as Kafka, RabbitMQ, Database, ActiveMQ, Syslog, Webhook, Logback. For example, you can select which data (fields such as header, parameter, body) will be sent to the Kafka connector. Key Refresh Dialog
Log settings can also be configured on the Global settings screen. For detailed information, you can refer to the Global Traffic Log Settings page.

Edit Dialog Screen

Log settings can be configured in the dialog screen that opens when the Edit button is clicked: Edit Dialog Fields used for log settings:
FieldDescription
HeaderEnables logging of values in the Header field of the message in the related region. Manages whether header information in the message is logged or not.
BodyEnables logging of values in the Body field of the message in the related region. Manages whether body information in the message is logged or not.
ParameterEnables logging of values in the Parameter field of the message in the related region. Manages whether parameter information in the message is logged or not.
ConnectorsUsed to select which connector the related logs will be sent to.

Privacy Settings

Privacy settings can be made to protect sensitive data in API Proxy traffic logs. These settings are configured when connectors are added to the environment. Which fields will be logged and which fields privacy operations (masking, deletion, hashing, encryption) will be applied to can be determined. For detailed information, you can refer to the Adding Connectors to Gateway Environments page. For environment configuration, see Gateway Runtimes.
In the Log Settings section, log settings are managed on an API Proxy basis.

Next Steps