public override async Task <SentryResponse> SendEventAsync(
            SentryEventData eventData)
        {
            if (!IsEnabled)
            {
                return(SentryResponse.Empty());
            }

            using (var stream = _serializer.Serialize(eventData))
                using (var res = await SendMessageAsync(stream))
                {
                    var responseProvider = new SentryResponseProvider(_serializer);

                    return(await responseProvider.GetResponseAsync(res));
                }
        }
Exemple #2
0
        public override async Task <SentryResponse> SendEventAsync(
            SentryEventData eventData)
        {
            if (!IsEnabled)
            {
                return(SentryResponse.Empty);
            }

            using (var stream = _streamSerializer.Serialize(eventData))
            {
                var httpResponse = await _sender
                                   .SendAsync(ComposeMessage(stream), None)
                                   .ConfigureAwait(false);

                var responseProvider = new SentryResponseProvider(_streamSerializer);

                return(await responseProvider.GetResponseAsync(httpResponse));
            }
        }