You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{context,trace}from"@opentelemetry/api";import{NodeSDK}from"@opentelemetry/sdk-node";import{OTLPTraceExporter}from"@opentelemetry/exporter-trace-otlp-grpc";constN=10_000;constsdk=newNodeSDK({traceExporter: newOTLPTraceExporter(),});sdk.start();consttracer=trace.getTracer("example-tracer-node");tracer.startActiveSpan("main",(span)=>{for(leti=0;i<N;i++){constglobalCtx=context.active();constctx=trace.setSpan(globalCtx,span);tracer.startActiveSpan("child",undefined,ctx,(childSpan)=>{// Do stuffconsole.log("doing stuff",i);childSpan.end();});}span.end();});awaitsdk.shutdown();console.log("finished");
What happened?
Batched exporter starts ignoring spans when I generate too many and don't manually flush.
Steps to Reproduce
Generate 10k spans and send them to batched processor
Expected Result
All of those spans are sent.
Actual Result
Only the first 2048 spans are reported, the rest is discarded.
Additional Details
Repro: https://github.com/jankaifer/batched-grpc/tree/5dbb9a3ffd80d7333cb14e035f8e5070db47802b
OpenTelemetry Setup Code
package.json
Relevant log output
I measured the bumper of reported spans in Zipkin (you can even see that the root span is
child
becausemain
was not reported):The text was updated successfully, but these errors were encountered: