Skip to content

Logs are lost while request is pending. #95

Description

@kristians-salna

this.sendLogs() method has a flaw that the assurance of data being successfully sent to the given endpoint is depending on combination of:

  1. Particular internet connection.
  2. sendLogs() execution timing from the client.

This particular flag - this.logSending is being reset within the this._postSuccess() method which is only being executed when the http promise is being resolved.

Which means that all logs which will be sent during the pending request time, will be dropped and forever lost here:
if (this.logSending || this.pendingLogs.length === 0) { return false; }

This should work and no logs must be silently dropped without an interval/batch/flushLogs involvement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions