sasai-common-utils 1.0.39 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -15,16 +15,17 @@ try {
|
|
|
15
15
|
url: globalConfig.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT || 'http://localhost:4318/v1/logs'
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
// Create
|
|
18
|
+
// Create batch processor for efficient log export
|
|
19
|
+
const logRecordProcessor = new BatchLogRecordProcessor(logExporter);
|
|
20
|
+
|
|
21
|
+
// Create Logger Provider with resource attributes and processor
|
|
19
22
|
otelLoggerProvider = new LoggerProvider({
|
|
20
23
|
resource: resourceFromAttributes({
|
|
21
24
|
'service.name': globalConfig.SERVICE_NAME || 'sasai-service',
|
|
22
25
|
'deployment.environment': globalConfig.NODE_ENV || ''
|
|
23
|
-
})
|
|
26
|
+
}),
|
|
27
|
+
logRecordProcessors: [logRecordProcessor]
|
|
24
28
|
});
|
|
25
|
-
|
|
26
|
-
// Add batch processor for efficient log export
|
|
27
|
-
otelLoggerProvider.addLogRecordProcessor(new BatchLogRecordProcessor(logExporter));
|
|
28
29
|
|
|
29
30
|
console.log('✅ OpenTelemetry Logs SDK initialized');
|
|
30
31
|
} catch (error) {
|