Provide a sync flush call
See original GitHub issueIf 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:
- Created 7 years ago
- Reactions:2
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@jeffwilcox, do you happen to have a repro of undefined
channel
when callingsendPendingData
? I can see that otherwise this method works as sync flush call.