@@ -50,28 +50,12 @@ async function initializeOpenTelemetry() {
5050 const { NodeSDK } = await import ( '@opentelemetry/sdk-node' )
5151 const { resourceFromAttributes } = await import ( '@opentelemetry/resources' )
5252 const { SemanticResourceAttributes } = await import ( '@opentelemetry/semantic-conventions' )
53- const { BatchSpanProcessor } = await import ( '@opentelemetry/sdk-trace-node' )
5453 const { OTLPTraceExporter } = await import ( '@opentelemetry/exporter-trace-otlp-http' )
5554
5655 const exporter = new OTLPTraceExporter ( {
5756 url : telemetryConfig . endpoint ,
5857 } )
5958
60- const spanProcessor = new BatchSpanProcessor ( exporter , {
61- maxQueueSize :
62- telemetryConfig . batchSettings ?. maxQueueSize ||
63- DEFAULT_TELEMETRY_CONFIG . batchSettings . maxQueueSize ,
64- maxExportBatchSize :
65- telemetryConfig . batchSettings ?. maxExportBatchSize ||
66- DEFAULT_TELEMETRY_CONFIG . batchSettings . maxExportBatchSize ,
67- scheduledDelayMillis :
68- telemetryConfig . batchSettings ?. scheduledDelayMillis ||
69- DEFAULT_TELEMETRY_CONFIG . batchSettings . scheduledDelayMillis ,
70- exportTimeoutMillis :
71- telemetryConfig . batchSettings ?. exportTimeoutMillis ||
72- DEFAULT_TELEMETRY_CONFIG . batchSettings . exportTimeoutMillis ,
73- } )
74-
7559 const configResource = resourceFromAttributes ( {
7660 [ SemanticResourceAttributes . SERVICE_NAME ] : telemetryConfig . serviceName ,
7761 [ SemanticResourceAttributes . SERVICE_VERSION ] : telemetryConfig . serviceVersion ,
@@ -80,7 +64,7 @@ async function initializeOpenTelemetry() {
8064
8165 const sdk = new NodeSDK ( {
8266 resource : configResource ,
83- spanProcessors : [ spanProcessor ] ,
67+ traceExporter : exporter ,
8468 } )
8569
8670 sdk . start ( )
0 commit comments