public void Invoke(IHttpServerEvent @event) { AddTag(@event, "requestId", () => _inboundRequestIdAccessor.InboundRequestId); AddTag(@event, "correlationId", () => _correlationIdAccessor.CorrelationId); AddTag(@event, "sessionId", () => _sessionIdAccessor.SessionId); AddTag(@event, "service", () => _applicationInfo.Name); AddTag(@event, "version", () => _applicationInfo.Version); }
public virtual void Invoke(IHttpServerEvent @event) { if (Exception != null) { throw Exception; } Events.Add(@event); }
private static void AddTag(IHttpServerEvent @event, string key, Func <string> valueGetter) { try { var value = valueGetter(); if (value != null) { @event.Tags.Add(key, value); } } catch { // Ignore any exceptions thrown by the getters } }
public void Invoke(IHttpServerEvent @event) { }
public void Invoke(IHttpServerEvent @event) { _logger.LogInformation(JsonConvert.SerializeObject(@event, _jsonSettings)); }
// TODO: Disconnect this from the request thread by using BlockingCollection public void Invoke(IHttpServerEvent @event) { Handle((dynamic)@event); }