Fix OTLP log export: BatchLogRecordProcessor takes an options object
CI / build (push) Successful in 58s

sdk-logs 0.221 changed the constructor to {exporter, ...} instead of a
bare exporter argument; passing the exporter directly silently left
this._exporter undefined, so every log export failed inside
suppressed error handling and no logs ever reached the collector.
This commit is contained in:
privatecloud builder
2026-07-25 12:30:06 +00:00
parent 95bef8bf7b
commit c57606cd90
+1 -1
View File
@@ -27,7 +27,7 @@ const sdk = new NodeSDK({
exportIntervalMillis: 15000,
}),
logRecordProcessors: [
new BatchLogRecordProcessor(new OTLPLogExporter({ url: `${endpoint}/v1/logs` })),
new BatchLogRecordProcessor({ exporter: new OTLPLogExporter({ url: `${endpoint}/v1/logs` }) }),
],
instrumentations: [
getNodeAutoInstrumentations({