GithubHelp home page GithubHelp logo

Comments (4)

anuraaga avatar anuraaga commented on May 29, 2024

Hi @dhenard - can you confirm the span processor you are using is the BatchSpanProcessor which should be the default? Your code has the forceFlush which should really be taking care of blocking until the span's been spent as implemented here

https://github.com/open-telemetry/opentelemetry-js/blob/392c43f2f6b10c608e8882cd97925a2fedd58b08/packages/opentelemetry-tracing/src/export/BatchSpanProcessor.ts#L55

If you happen to be using the SimpleSpanProcessor, then indeed there seems to be a bug there as pending requests would not actually be waited on.

https://github.com/open-telemetry/opentelemetry-js/blob/392c43f2f6b10c608e8882cd97925a2fedd58b08/packages/opentelemetry-tracing/src/export/SimpleSpanProcessor.ts#L38

from aws-otel-community.

anuraaga avatar anuraaga commented on May 29, 2024

Sorry I noticed our docs are incorrectly using SimpleSpanProcessor so I guess you might be using it

https://aws-otel.github.io/docs/getting-started/js-sdk/trace-manual-instr#export-trace-data-to-otlp-exporter

If you can try the BatchSpanProcessor (I think just replace the import / constructor call) that would be great.

from aws-otel-community.

dhenard avatar dhenard commented on May 29, 2024

Hey @anuraaga - Thanks for looking into this, I was using the SimpleSpanProcessor but will give the BatchSpanProcessor a go.

BatchSpanProcessor is working without the need for a delay.

from aws-otel-community.

anuraaga avatar anuraaga commented on May 29, 2024

@dhenard Excellent, glad to hear that! Let me close this issue and feel free to post again if anything comes up.

from aws-otel-community.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.