You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
flush method or event... Known that an error has been sent #167
@mattrobenolt,
This doesn't work if I'm sending multiple errors concurrently.
I have no way of know what message an error event was related to..
I probably won't be sending multiple errors in parallel, but this is just getting sketchy, and I don't like that :)
Ideal would be for captureMessage to return a promise.
But a mere flush() method, so that we could do:
sentry.flush().catch(err => console.log(...)).then(() => process.exit(1));
would be nice...
ie. so flush() is done when there is no pending/outstanding messages..
In Go, we have a different method entirely which is CaptureAndWait() which then returns after the payload has been sent.
We could do similar in node here, where instead of actually waiting, it's just a promise or callback. I'm not too up to date on the state of promises to say what'd be involved in supporting that, but a callback would probably be more trivial in the current state of codebase.
Activity
mattrobenolt commentedon Jun 8, 2016
We do! See: https://docs.getsentry.com/hosted/clients/node/usage/#events
jonasfj commentedon Jun 8, 2016
@mattrobenolt,
This doesn't work if I'm sending multiple errors concurrently.
I have no way of know what message an error event was related to..
I probably won't be sending multiple errors in parallel, but this is just getting sketchy, and I don't like that :)
Ideal would be for captureMessage to return a promise.
But a mere flush() method, so that we could do:
sentry.flush().catch(err => console.log(...)).then(() => process.exit(1));
would be nice...
ie. so flush() is done when there is no pending/outstanding messages..
mattrobenolt commentedon Jun 8, 2016
In Go, we have a different method entirely which is
CaptureAndWait()which then returns after the payload has been sent.We could do similar in node here, where instead of actually waiting, it's just a promise or callback. I'm not too up to date on the state of promises to say what'd be involved in supporting that, but a callback would probably be more trivial in the current state of codebase.