open-telemetry / opentelemetry-js

OpenTelemetry JavaScript Client
https://opentelemetry.io
Apache License 2.0
2.74k stars 795 forks source link

Dropped * spans because maxQueueSize reached. #4184

Closed jholm117 closed 1 year ago

jholm117 commented 1 year ago

Hello! We are seeing this error message from our otel-instrumented app with varying span amounts roughly every 5 seconds.

Dropped 2228 spans because maxQueueSize reached

I've tried increasing the maxQueueSize to 6144 (the default is 2048).

const sdk = new NodeSDK({
  autoDetectResources: true,
  traceExporter: exporter,
  spanProcessor: new BatchSpanProcessor(exporter, {
    maxQueueSize: 6144,
  }),

but this did not seem to affect the behavior at all. Is someone able to recommend a way to look into diagnosing/fixing this issue?

pichlermarc commented 1 year ago

Hi @jholm117, thanks for reaching out.

I'm closing this as a duplicate of #3094. The BatchSpanProcessor does not eager-export at the moment, which means that if the queue size is reached, it will not attempt to export but actually drop the spans that exceed the limit. There are several PRs open for #3094, so you can expect this to be addressed in an upcoming release.

jholm117 commented 2 weeks ago

Hello, unfortunately I'm still seeing this on version 1.26.0 of @opentelemetry/sdk-trace-base. Any ideas?