Question: I'm trying to log any startup errors but the logs are not flowing into application insights. I tried configuring app insights in program.cs but still I don't see any logs.

```cs
public static IHostBuilder CreateHostBuilder(string[] args) =>

    Host.CreateDefaultBuilder(args)
        .ConfigureLogging(logging =>
        {
            logging.ClearProviders();
            logging.AddApplicationInsights();
            logging.SetMinimumLevel(LogLevel.Information);
        });

```

Answer: 
Just add another limiter in `app\Providers\RouteServiceProvider.php` inside `configureRateLimiting` function

like so;

```
protected function configureRateLimiting() {

    //Default Limiter
    RateLimiter::for('api', function (Request $request) {
        return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
    });

    //Your Limiter - limit 10 request per day    
    RateLimiter::for('day', function (Request $request) {
        return Limit::perDay(10)->by(optional($request->user())->id ?: $request->ip());
    });
}

```

then you can use it in a middleware for `throttle` implementation

e.g.

```
// on group routes
Route::group(['middleware' => 'throttle:day'], function () {
    Route::get('/limit-test', function( \Illuminate\Http\Request $request) {
        return $request;
    })->name('rate.test');
});

// with single route
Route::get('/limit-test', function( \Illuminate\Http\Request $request) {
    return Illuminate\Support\Facades\RateLimiter::remaining( $request->ip, 10);
    return $request;
})->middleware('throttle:day');

//or inside a controller
public function __construct() {

    //All methods
    $this->middleware('throttle:day');

    // or on specific method
    //$this->middleware('throttle:day')->only('whatEverFunction'); 

    // or all method except
    //$this->middleware('throttle:day')->except('whatEverFunction');
}

```

If you check the response header, you should be able to see

```
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 9

```
you can use this code

```
RateLimiter::for('api', function (Request $request) {
        return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
    });

```