Working with logs

Edit on GitHub

This document describes how to work with logs(events). Logs provide information about the state of application and related services. In Spryker Cloud Commerce OS, logging is maintained by Amazon CloudWatch.

Log groups

To make log browsing easier, logs from the same source form a log stream. Log streams with the same retention, monitoring, and access control settings form a log group. The following is an approximate list of log groups that can be available in your project. The actual list of log groups depends on your setup.

LOG GROUP PATH
AWS code build pipelines DESTRUCTIVE pipeline jobs: /aws/codebuild/danger/{environment_name}
NORMAL pipeline jobs: /aws/codebuild/{environment_name}
AWS Elasticsearch /aws/elasticsearch/{environment_name}
AWS RDS instances /aws/rds/instance/{environment_name}/error
AWS Certificates expiration /aws/lambda/{environment_name}-certificate-expiration
AWS Codebuild /codebuild
EC2 Jenkins /ec2/{environment_name}/jenkins/docker
ECS blackfire /ecs/fargate/{environment_name}/blackfire/docker
Frontend service /ecs/{environment_name}/frontend/docker
Glue API /ecs/{environment_name}/glue/docker
Glue Backend API /ecs/{environment_name}/glue_backend/docker
ECS Jenkins /ecs/{environment_name}/jenkins/docker
RabbitMQ ECS /ecs/{environment_name}/rabbitmq/docker
Storefront (Yves) /ecs/{environment_name}/yves/docker
ECS ZED /ecs/{environment_name}/zed/docker
Back Office /ecs/{environment_name}/boffice/docker
Merchant Portal /ecs/{environment_name}/mportal/docker

Audit logs

Audit logs are a type of logs used to track user-related activities. If audit logs are installed, you can browse them for the following log groups:

  • Storefront (Yves)
  • Back Office
  • Merchant Portal
  • Glue API
  • Glue Backend API

The actual list of applications for which audit logs are enabled depends on your setup.

The following audit events are logged by default:

  • Successful login
  • Failed login
  • Password reset requested
  • Password updated after reset
  • Agent Assist feature logs:
    • Impersonation started
    • Impersonation ended

Search in logs

  1. In the AWS Management Console, go to Services > CloudWatch > Log groups.

  2. In the Log groups pane, filter log groups by entering a query in the search bar. For example, enter staging.

filter log groups

  1. Select the desired log group.

  2. In the Log streams pane, select the log stream according the last event. The last event time should match the time when the issue occurred.

select log stream

  1. In the Log events pane, filter events by entering a query in the search bar. When browsing audit logs, you might want to filter by tile, like audit, or by a user, like sonia@spryker.com.

Next step

Preparation for going live