`@NgModule({` `declarations: [AppComponent],` ...
# general
b
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
OpenTelemetryInterceptorModule.forRoot({
commonConfig: {
console: true, // Display trace on console
production: false, // Send Trace with BatchSpanProcessor (true) or SimpleSpanProcessor (false)
serviceName: 'Angular Sample App', // Service name send in trace
logBody: true, // true add body in a log, nothing otherwise
probabilitySampler: '1', // 75% sampling
logLevel: DiagLogLevel.ALL, //ALL Log, DiagLogLevel is an Enum from @opentelemetry/api
},
otelcolConfig: {
url: '<http://127.0.0.1:4318/v1/traces>', // URL of opentelemetry collector
attributes: {
test: 'test',
},
},
}),
//Insert OtelCol exporter module
OtelColExporterModule,
//Insert propagator module
CompositePropagatorModule,
],
providers: [],
bootstrap: [AppComponent],
})