philkra / elastic-apm-laravel

Elastic APM Client for Laravel
94 stars 50 forks source link

InvalidArgumentException: [0] Auth guard driver [api] is not defined. #61

Closed YuZhenXie closed 2 years ago

YuZhenXie commented 5 years ago

I tested it in the Lumen 5.5.* project which didn't register AuthServiceProvider and resulted in the following alert.

"InvalidArgumentException: [0] Auth guard driver [api] is not defined."

It was because $request->user() tries to get authenticated user with default guard api which is not defined. Would it be better that setUserContext in RecordTransaction is conditional based on configuration?

philkra commented 2 years ago

closing as repo is going to be archived.