public RaygunClient(RaygunSettings settings, HttpContext context = null) : base(settings) { if (settings.IgnoreFormFieldNames != null) { var ignoredNames = settings.IgnoreFormFieldNames; IgnoreFormFieldNames(ignoredNames); } if (settings.IgnoreHeaderNames != null) { var ignoredNames = settings.IgnoreHeaderNames; IgnoreHeaderNames(ignoredNames); } if (settings.IgnoreCookieNames != null) { var ignoredNames = settings.IgnoreCookieNames; IgnoreCookieNames(ignoredNames); } if (settings.IgnoreServerVariableNames != null) { var ignoredNames = settings.IgnoreServerVariableNames; IgnoreServerVariableNames(ignoredNames); } if (!string.IsNullOrEmpty(settings.ApplicationVersion)) { ApplicationVersion = settings.ApplicationVersion; } IsRawDataIgnored = settings.IsRawDataIgnored; if (context != null) { SetCurrentContext(context); } }
public RaygunAspNetMiddleware(RequestDelegate next, IOptions <RaygunSettings> settings, RaygunMiddlewareSettings middlewareSettings) { _next = next; _middlewareSettings = middlewareSettings; _settings = _middlewareSettings.ClientProvider.GetRaygunSettings(settings.Value ?? new RaygunSettings()); }
public RaygunAspNetMiddleware(RequestDelegate next, IOptions <RaygunSettings> settings, RaygunMiddlewareSettings middlewareSettings) { _next = next; _middlewareSettings = middlewareSettings; _settings = _middlewareSettings.ClientProvider.GetRaygunSettings(settings.Value ?? new RaygunSettings()); _aspNetCoreInitializer = new AspNetCoreInitializer(); _aspNetCoreInitializer.Initialize(_settings.ApplicationIdentifier); }
public RaygunClient(RaygunSettings settings, HttpContext context = null) : base(settings) { if (settings.IgnoreSensitiveFieldNames != null) { var ignoredNames = settings.IgnoreSensitiveFieldNames; IgnoreSensitiveFieldNames(ignoredNames); } if (settings.IgnoreQueryParameterNames != null) { var ignoredNames = settings.IgnoreQueryParameterNames; IgnoreQueryParameterNames(ignoredNames); } if (settings.IgnoreFormFieldNames != null) { var ignoredNames = settings.IgnoreFormFieldNames; IgnoreFormFieldNames(ignoredNames); } if (settings.IgnoreHeaderNames != null) { var ignoredNames = settings.IgnoreHeaderNames; IgnoreHeaderNames(ignoredNames); } if (settings.IgnoreCookieNames != null) { var ignoredNames = settings.IgnoreCookieNames; IgnoreCookieNames(ignoredNames); } if (settings.IgnoreServerVariableNames != null) { var ignoredNames = settings.IgnoreServerVariableNames; IgnoreServerVariableNames(ignoredNames); } if (!string.IsNullOrEmpty(settings.ApplicationVersion)) { ApplicationVersion = settings.ApplicationVersion; } IsRawDataIgnored = settings.IsRawDataIgnored; IsRawDataIgnoredWhenFilteringFailed = settings.IsRawDataIgnoredWhenFilteringFailed; UseXmlRawDataFilter = settings.UseXmlRawDataFilter; UseKeyValuePairRawDataFilter = settings.UseKeyValuePairRawDataFilter; if (context != null) { SetCurrentContext(context); } }
protected override bool CanSend(RaygunMessage message) { if (message?.Details?.Response == null) { return(true); } RaygunSettings settings = GetSettings(); if (settings.ExcludedStatusCodes == null) { return(true); } return(!settings.ExcludedStatusCodes.Contains(message.Details.Response.StatusCode)); }
public virtual RaygunSettings GetRaygunSettings(RaygunSettings baseSettings) { return(baseSettings); }
public virtual RaygunClient GetClient(RaygunSettings settings, HttpContext context) { return(new RaygunClient(settings, context)); }
public virtual RaygunClient GetClient(RaygunSettings settings) { return(GetClient(settings, null)); }