Required Prerequisites

APM Configuration

The DLC relies on APM’s IHealthEventDispatcher to dispatch HealthEvents as well as Trace the HealthEvents by using a TraceContext. To ensure APM and its Tracing components are configured correctly the following configurations will need to be implemented into your project.

Required Configuration Classes
Required Configuration Classes Replaces Configuration Class
APMTracingConfig.class N/A
APMActivePivotServicesConfig.class ActivePivotServicesConfig

An example of including these configuration classes can be seen as follows:

    // Required Configurations for Tracing and APM
public class ApplicationConfig {
Active Pivot Registry Configuration

APM must be defined with high precedence in ActivePivot’s Registry. This is because some classes are Extended Plugins or Types overriding the core code. It is important to make sure they are picked first by the Registry. Make sure you add the package com.activeviam.apm to be picked first. The below example can be added to your applications configuration.

/** Before anything else we statically initialize the ActiveViam Registry. */
static {
        new ClasspathContributionProvider(
            "com.activeviam.apm",  // First has highest priority
Bean Initial Data Loading

If you are executing any DLC tasks via Spring Beans during initialization of your application, you must ensure that the APM_TRACING bean is created first. The APM_TRACING bean is required to be created before any data loading. The bean is created inside of APMTracingConfig. If this bean has not been created before data loading, then the Tracing provided by APM will not work and this can result in null Tracing values. You can ensure the APM_TRACING bean is created first by either the @DependsOn annotation or by Autowiring the APM_TRACING bean. Please see the code sample below as an example:

@DependsOn(value = {APM_TRACING})
public Void initialLoad() {
    // Load data here...