-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log file isn't created #7
Comments
Hi @netdjw , middleware is registered automatically. |
Hi @mantas-done , I updated to v1.0.10, but still the same. This is my <?php
return [
/**
* Enable or disable APM
*/
'enabled' => env('MONITORING_APM', false),
/**
* How many results per page to show
*/
'per_page' => 100,
/**
* Logs only part of requests. 1 - 100%, 0.1 - 10% of requests.
*/
'sampling' => 1,
/**
* Log queries of pages that spent in SQL more than given seconds
*/
'slow' => 3,
]; The I made a test exception in my code to verify the middleware is in the stacktrace and I see this:
So the middleware is loaded just not write the log file. |
Can you try setting 'enabled' to 'true' or adding to your .env file: MONITORING_APM=1
If that didn't work I will think of a better way to debug.
…On Sat, Feb 10, 2024, 07:49 Balázs Winkler ***@***.***> wrote:
Hi @mantas-done <https://github.com/mantas-done> , I updated to v1.0.10,
but still the same.
This is my config/apm.php:
<?php
return [
/** * Enable or disable APM */
'enabled' => env('MONITORING_APM', false),
/** * How many results per page to show */
'per_page' => 100,
/** * Logs only part of requests. 1 - 100%, 0.1 - 10% of requests. */
'sampling' => 1,
/** * Log queries of pages that spent in SQL more than given seconds */
'slow' => 3,
];
The storage/app/apm/ directory has 777 mod for testing.
I made a test exception in my code to verify the middleware is in the
stacktrace and I see this:
Done \ LaravelAPM \ Middleware \ DelayedWriter: 12 handle
So the middleware is loaded just not write the log file.
—
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AECVOJQE7XJB5CHFNYR426DYS4C6JAVCNFSM6AAAAABC5H7BZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZWHA4DSMRRGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Still not work. I tried with I used public function handle($request, Closure $next)
{
return $next($request);
} I think this isn't do anything. LogWriter's methods also not called. |
Sorry about slow replies, I'm was busy a while. |
I added and not executing. |
Just making sure, you have looked into your log files? (because terminate method executes when the response is already sent to the browser and doing dd() or echo won't show up in the browser). |
Got the same issue. Added Log::info('test'); in DelayedResponse, log test shown on file but no request apm is logged |
if possible, can you also add Log::info('test') inside the ::write() method and see where it gets stuck. |
it seems that the listener got registered here but RequestWatcher::class, 'record' method isn't called |
It seems that I ran using laravel 5.3 by adding this, the requests are logged |
In composer.json, it requires at least Laravel 5.5. |
don't know why my composer can install this though. but now works on my side |
I made all steps from README, but log file isn't created so the package always show nothing on charts.
Isn't miss the documentation register a middleware or similar thing?
The text was updated successfully, but these errors were encountered: