Operational and metrics Logs
Amazon EFS is mounted to the ECS cluster using NFS protocol and is shared among all container instances. Prebid Server writes two log files while running - one for stdout/stderr
operational logging and one for auction metrics. They are both located on the EFS with a unique path based on the container instance to prevent collision. The operational log files generated by the Prebid Service container are located at /mnt/efs/logs/<CONTAINER_ID>/prebid-server.log
. These files are rotated periodically, every day at midnight and placed in the archived folder located at /mnt/efs/logs/<CONTAINER_ID>/archived/prebid-server.%d{yyyy-MM-dd}.%i.log.gz
.
If the generated log file exceeds a size limit of 100 MB, this rotation happens earlier. In a similar fashion, the metrics logs are located at /mnt/efs/metrics/<CONTAINER_ID>/prebid-metrics.log
and archived at /mnt/efs/metrics/<CONTAINER_ID>/archived/prebid-metrics.%d{yyyy-MM-dd_HH}.%i.log.gz
. These files are rotated at the top of each hour (period of one hour). The logging configurations are available through settings in the deployment/ecr/prebid-server/prebid-logging.xml
file in the Prebid Server source code.
Note
If a container task receives a termination signal from ECS, for reasons such as scale-in or Spot interruptions, then the solution automatically compresses and transfers the current active log files to their respective archived folders to ensure no discontinuity or loss of log data. The transferred logs will be picked up along with any other log files in the archived
directory when the DataSync task runs.