vercel / otel

OTEL tracing for Vercel
https://vercel.com/docs/observability/otel-overview
38 stars 9 forks source link

BatchExporter not working on nextjs/vercel/otel #105

Open pksorensen opened 4 months ago

pksorensen commented 4 months ago

Hi,

I made a small repo https://github.com/pksorensen/nextjs-repro-otel/tree/bugs/batchprocessor related to another issue and found additional issues that i am unsure where to report/solve.

https://github.com/vercel/next.js/issues/67737

I found out that when using batchprocessor is used over simpleprocesor , then no spans are exported when it is on the edge runtime (was testing opentelemetry from Middleware ).

in instrumentation try to change from batch to simple and it works as expected (you see spans in console) and with batch you dont.

gitDeveloper3 commented 1 month ago

did someone find the soluton to this? Am facing the same issue

KiithNabaal commented 1 month ago

I don't believe this is an issue with this library, as I had issues with BatchSpanProcessor before I even tried using this. From what I can tell, the implementation of that processor is a little buggy. You might have better luck reporting this on the main OpenTelemetry repo for JavaScript. BatchSpanProcessor isn't something Vercel implemented or probably even maintains.