exceptionless / Exceptionless.Java

Exceptionless Java client
Apache License 2.0
6 stars 2 forks source link

Add async submission methods #27

Closed pc9795 closed 3 years ago

pc9795 commented 3 years ago

Currently, we support methods such as submitLog that submit events synchronously. Add corresponding methods to submit this asynchronously.

niemyjski commented 3 years ago

In our new JavaScript client we have submit be async (due to library calls that forced us to be async in the plugins) but it doesn't make http requests as that happens in a background job on the queue.. In .NET Event submission is fully synchronous. I don't see any point to add async calls if nothing else is async as it just muddies the api surface for no gain (unless I'm missing something). Also doesn't feel right that it forces the consumer to think about threading (number of threads passed into the constructor).

niemyjski commented 3 years ago

Reopened just to track last comment on async methods

pc9795 commented 3 years ago

Actually, you are right as event submission happens through a queue the codebase is already async. The only thing which will be made async through submitXXXAsync methods will be the plugin runs. Until these plugins are doing some heavy lifting then there is no sense in having these async methods.

pc9795 commented 3 years ago

I will add some documentation more importantly in the public-facing classes. https://github.com/exceptionless/Exceptionless.Java/issues/37

github-actions[bot] commented 3 years ago

This issue is stale