Conducting an LTTng tracing session

Use the lttng command line tool to create, start and then stop and view a tracing session.

Procedure

  1. Ensure that the microservice you wish to trace is not running.
  2. On a Unix command line prompt, create a new tracing session by entering the following command:
    lttng create session-name

    where session-name is a unique name for this tracing session.

  3. Enable Log4j logging with the following command:
    lttng enable-event -a -l
  4. Start the tracing session with the following command:
    lttng start
  5. Start the microservice.
  6. When you want to stop the tracing session and view the logs, enter the following commands:
    lttng stop
    lttng view