Execution Recorder

OpenResty XRay provides a powerful execution recorder feature that can help developers and operations personnel record the execution information of an application for a period of time before an exception occurs. Compared to Core Dump, the execution recorder feature can record more valuable information. This document will introduce the usage and considerations of this feature in detail.

Feature Overview

The execution recorder feature of OpenResty XRay supports recording the entire application or specific processes of the application. When an application process exits abnormally, the recording file will be automatically uploaded to the OpenResty XRay console for further analysis.

Usage

1. Select Recording Target

You can choose to record the entire application or a specific process of the application:

  • Record the entire application: When a process of the application exits normally, OpenResty XRay will automatically restart the recording of a new process.

  • Record a single process: When the process exits, the recording will stop automatically.

2. Configure Event Buffer Size

Before starting the recording, you need to confirm the size of the event buffer. This configuration item defaults to 512 MB, indicating the maximum memory that each recording process can occupy. If the machine has sufficient memory, you can appropriately increase this configuration to retain more execution information before an exception occurs.

3. Start Recording

After the configuration is complete, you can start recording. When an application process exits abnormally, the recording file will be automatically uploaded to the OpenResty XRay console.

4. Analyze Recording Files

Currently, OpenResty XRay does not support independent analysis of recording files. If further analysis is required, please contact our technical support team.

Considerations

  • The execution recorder feature has a significant impact on performance. In most scenarios, the performance after starting the recording is only about 20% of that without recording. Please weigh whether to enable this feature based on the actual situation.
  • Recording files will occupy a certain amount of storage space, so please ensure that there is sufficient disk space.