question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide a sync flush call

See original GitHub issue

If an application immediately shuts down after logging an event, for example, it can happen that the events are dropped and never written to disk for later submission. It seems that there is a sync implementation of it, but it is not exposed in the API.

If it were, we could always call that method when listening on process exit: process.on('exit'...

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
AlexBulankoucommented, Aug 28, 2017

With the updated API, sendPendingData was renamed to flush which provides a way set a flag indicating that app is crashing, so they payload needs to be saved on disk immediately: client.flush({isAppCrashing: true}) .

I’m going to close the issue for now. Please reactivate if there’s a repro with SDK crashing with undefiend channel when flush() is called.

0reactions
AlexBulankoucommented, Aug 23, 2017

@jeffwilcox, do you happen to have a repro of undefined channel when calling sendPendingData? I can see that otherwise this method works as sync flush call.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Provide a sync flush call · Issue #81 - GitHub
Hi, I wanted to see if there was any update here - this is a key issue for us as it really impacts...
Read more >
Synced flush API | Elasticsearch Guide [8.5] | Elastic
The synced flush API has been removed. Use the flush API instead. A regular flush has the same effect as a synced flush...
Read more >
Synced Flush - API Manual
Synced Flush. Elasticsearch tracks the indexing activity of each shard. Shards that have not received any indexing operations for 5 minutes are automatically ......
Read more >
Does issuing a sync call flush an SSD's write cache?
The sync call will guarantee that any writes, even if they are stored in the write cache, will be flushed to disk by...
Read more >
When to flush a file in Go? - Stack Overflow
Calling os.File.Sync() will call the fsync() syscall which will force the file system to flush it's buffers to disk.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found