Troubleshooting With Traces

Last modified 15 Nov 2021 11:25 +01:00
This feature is experimental. It means that it is not intended for production use. The feature is not finished. It is not stable. The implementation may contain bugs, the configuration may change at any moment without any warning and it may not work at all. Use at your own risk. This feature is not covered by midPoint support. In case that you are interested in supporting development of this feature, please consider purchasing midPoint Platform subscription.
  1. Enable experimental features in GUI. Logout + login.

  2. Select tracing profile e.g. "functional" when invoking an operation.

  3. Find the trace in "Reports created" and click on "eye" icon.

  4. Enjoy!


Tracing is an unofficial and highly experimental feature of midPoint troubleshooting. The principle is very simple: any operation in midPoint can be recorded into a special trace file, and that file can be later analyzed.

Recording can be done in the following ways:

  1. By requesting it via GUI when starting an operation. (Supported for majority - but not all - operations: those that have "options bar" available.)

  2. By requesting regular tracing (each N processed objects) in background tasks.

  3. By turning on tracing of all operations in midPoint.

Analysis can be carried out via:

  1. midPoint GUI (via Created reports page - since 4.1),

  2. Eclipse plugin (but only using unpublished version in feature/tracing branch - and this plugin is already deprecated),

  3. IntelliJ IDEA plugin (but this feature is not finished there).

Enabling experimental features

To record (via GUI) or to view traces you have to enable experimental features of midPoint GUI:

image2019 10 14 15 22 46

After the change, please log out and log in, in order to apply the changed settings.

Recording traces via GUI

Now you can execute any operation in "traced mode" like this:

image2019 10 14 15 24 0

There are two basic flavors of tracing:

  1. Functional tracing. It is used to troubleshoot functional issues like misbehaving mappings. There is a lot of information collected, and therefore this can have a significant performance impact. It is often advisable to include logging information in recorded traces, e.g. model, provisioning, or SQL logging.

  2. Performance tracing. This one is suitable to pinpoint performance issues. Here we collect only basic information, so the impact on performance is quite low.

After operation is complete, the trace is stored in trace subdirectory of midPoint home directory. It can be obtained either directly from there, or downloaded/viewed from within _Created reports _menu item (see below).

Recording traces for background tasks

A task can record the trace(s) for objects being processed by including the following configuration snippet (adapted as needed):

<task ...>
    <extension ...>
        <mext:tracing xmlns:mext="">
            <interval>1</interval> <!-- we will trace each object processed -->
                <fileNamePattern>trace %{timestamp} %{testNameShort} %{focusName} %{milliseconds}</fileNamePattern>

Analyzing traces via GUI

First you need to open Created reports page:

image2020 3 27 9 13 50

After clicking on "eye" icon you get the Trace view page:

image2020 3 27 9 22 44

Now you can configure the view you’d like to obtain and click the Show button. As the trace file is usually quite large (tens or hundreds of megabytes) it will take a few seconds before displaying. But subsequent visualizations of the same trace (with changed parameters) should be quite fast. (Also make sure you get enough heap when opening large traces. ☺)

More information about the Trace view is on Trace visualization page.

Analyzing traces via IDEA plugin


Tracing customization

Tracing profiles are available in the system configuration. If you need to change them (typically if you need to include more logging), you can update the configuration.

An example of adding workflow module logging:

    <displayName>Functional tracing (with model and workflows logging)</displayName>
    <fileNamePattern>functional-trace %{timestamp} %{focusName}</fileNamePattern>



Was this page helpful?
Thanks for your feedback