Fix OTLP log export: BatchLogRecordProcessor takes an options object
CI / build (push) Successful in 58s
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:
+1
-1
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user