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
TracingConfig.class N/A
BraveTracingConfig.class Tracing Implementation Configuration. See Example Tracing Configuration for an example configuration.

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

@Configuration
@Import({
    // Required Configurations for Tracing and APM
    TracingConfig.class, 
    BraveTracingConfig.class, 
    DataLoadControllerRestServiceConfig.class
})
public class ApplicationConfig {
}
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 TracingConfig. 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:

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