/// <summary> /// Initializes a new instance of the <see cref="RollbarLoggerProvider" /> class. /// </summary> /// <param name="configuration">The configuration.</param> /// <param name="options">The options.</param> /// <param name="httpContextAccessor">The HTTP context accessor.</param> public RollbarLoggerProvider( IConfiguration configuration , IOptions <RollbarOptions> options , IHttpContextAccessor httpContextAccessor ) { Assumption.AssertNotNull(configuration, nameof(configuration)); Assumption.AssertNotNull(options, nameof(options)); RollbarConfigurationUtil.DeduceRollbarTelemetryConfig(configuration); TelemetryCollector.Instance.StartAutocollection(); this._rollbarOptions = options.Value; this._rollbarConfig = RollbarConfigurationUtil.DeduceRollbarConfig(configuration); this._httpContextAccessor = httpContextAccessor; Assumption.AssertNotNull(this._rollbarConfig, nameof(this._rollbarConfig)); Assumption.AssertNotNullOrWhiteSpace(this._rollbarConfig.AccessToken, nameof(this._rollbarConfig.AccessToken)); }