Coder Social home page Coder Social logo

Comments (3)

thesmart avatar thesmart commented on August 24, 2024

I have the same question. CMIIW, @dominicbarnes, but the error handling seems logically unsound. Calling track n-times, there's no way to determine which subset of track calls failed when the batch fails because all the track callbacks are called with the single batch call error. The batch method documentation contains no information about the response... does it fail all if one fails? Are payloads partially accepted?

I suppose we need to error-handle every individual call, and we won't know which specific calls failed. I suppose turning off automatic batching would help error handling but sacrifice performance.

from analytics-node.

vadimdemedes avatar vadimdemedes commented on August 24, 2024

I agree with @thesmart, the error handling of tracking methods (identify(), track(), etc) doesn't make much sense to me. While we could easily add flush event, I'm not sure what purpose would it serve. I'd expect analytics library to handle tracking/sending errors by itself. E.g. if flush() fails, I'd expect it to reschedule the flush and retry. But I wouldn't want to handle that logic manually.

@conorgil could you share more about your use case and what do you want to achieve with error and flush events? It would make it easier to understand the benefit of having those events.

from analytics-node.

vadimdemedes avatar vadimdemedes commented on August 24, 2024

Closing due to lack of response. If issue isn't resolved, feel free to reply and I'll reopen it.

from analytics-node.

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.