Inheritance: System.Configuration.ConfigurationSection
Example #1
0
        public RaygunClient(RaygunSettings settings)
        {
            _settings = settings;
            _apiKey   = settings.ApiKey;

            _wrapperExceptions.Add(typeof(TargetInvocationException));

            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;
        }
    public RaygunAspNetMiddleware(RequestDelegate next, IOptions<RaygunSettings> settings, RaygunMiddlewareSettings middlewareSettings)
    {
      _next = next;
      _middlewareSettings = middlewareSettings;

      _settings = _middlewareSettings.ClientProvider.GetRaygunSettings(settings.Value ?? new RaygunSettings());  
    }
Example #3
0
        public RaygunAspNetMiddleware(RequestDelegate next, IOptions <RaygunSettings> settings, RaygunMiddlewareSettings middlewareSettings)
        {
            _next = next;
            _middlewareSettings = middlewareSettings;

            _settings = _middlewareSettings.ClientProvider.GetRaygunSettings(settings.Value ?? new RaygunSettings());
        }
Example #4
0
        public RaygunClient(string apiKey, RaygunSettings settings)
        {
            _settings = settings;
            _apiKey = apiKey;
            _wrapperExceptions = new List<Type>();
            _wrapperExceptions.Add(typeof(TargetInvocationException));
            _wrapperExceptions.Add(typeof(AggregateException));

            ThreadPool.QueueUserWorkItem(state => { SendStoredMessages(); });
        }
Example #5
0
        public RaygunClient(RaygunSettings settings)
        {
            _settings = settings;
            _apiKey   = settings.ApiKey;

            _wrapperExceptions.Add(typeof(TargetInvocationException));

            if (!string.IsNullOrEmpty(settings.ApplicationVersion))
            {
                ApplicationVersion = settings.ApplicationVersion;
            }
        }
Example #6
0
        public static RaygunEnvironmentMessage Build(RaygunSettings settings)
        {
            RaygunEnvironmentMessage message = new RaygunEnvironmentMessage();

            // The cross platform APIs for getting this information don't exist right now.

            try
            {
                DateTime now = DateTime.Now;
                message.UtcOffset = TimeZoneInfo.Local.GetUtcOffset(now).TotalHours;
                message.Locale    = CultureInfo.CurrentCulture.DisplayName;
            }
            catch (Exception ex)
            {
                Debug.WriteLine($"Failed to capture time locale {ex.Message}");
            }

            return(message);
        }
Example #7
0
    public RaygunClient(RaygunSettings settings, HttpContext context = null)
    {
      _settings = settings;
      _apiKey = settings.ApiKey;

      _wrapperExceptions.Add(typeof(TargetInvocationException));

      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);
      }
    }
Example #8
0
 public virtual RaygunSettings GetRaygunSettings(RaygunSettings baseSettings)
 {
     return(baseSettings);
 }
Example #9
0
 public virtual RaygunClient GetClient(RaygunSettings settings, HttpContext context)
 {
     return(new RaygunClient(settings, context));
 }
Example #10
0
 public virtual RaygunClient GetClient(RaygunSettings settings)
 {
     return(GetClient(settings, null));
 }
 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);
 }
Example #14
0
 private RaygunMessageBuilder(RaygunSettings settings)
 {
     _raygunMessage = new RaygunMessage();
     _settings      = settings;
 }
Example #15
0
 public static RaygunMessageBuilder New(RaygunSettings settings)
 {
     return(new RaygunMessageBuilder(settings));
 }