Closed djimnz closed 1 year ago
+1 Running on Octane (RoadRunner server)
@alphaolomi and @djimnz are you both using Laravel Vapor? Which versions?
Please try installing version 4.0.34 directly and let me know what issues you are having. Also ensure that the configuration is published and ENV variables are set.
OCTANE
Config is present and all required envs are added.
"laravel/octane": "^2.0",
"treblle/treblle-laravel": "^4.0", // 4.0.34
Environment ............................................
Application Name ........................ My Laravel App
Laravel Version ................................ 10.14.1
PHP Version ..................................... 8.1.20
Composer Version ................................. 2.5.8
Environment ...................................... local
Debug Mode ..................................... ENABLED
URL ..................................... localhost:8000
Maintenance Mode ................................... OFF
TypeError: Treblle\Middlewares\TreblleMiddleware::handle(): Return value must be of type Illuminate\Http\Response|Illuminate\Http\JsonResponse, Illuminate\Http\RedirectResponse returned
You are adding the middleware to a route that it shouldn't be on. An API should return a JSON response or a Response directly - not a Redirect
@JustSteveKing I confirm that last version of Treblle for Laravel is now working well! Thank you.
Is there a way to send the data to Treblle via Queue system? This is currently slowing down my API quite much.
Thank you!
Hey @djimnz that unfortunately is not possible. The Treblle middleware executes at the end of the process once your API has already sent a response. This is terminating
middleware
Version
Description
Following the Laravel Package installation documentation. And running my API via Vapor, I'm encountering an issue with your middleware. Currently, I cannot install
treblle-laravel
version ^4 since my composer is configured for stable packages only.Here the logs:
Thank you!
Expected behavior
Recording API calls onto Treblle.