A self-hosted metrics and notifications platform for Laravel apps

Overview

Larametrics

Current Version License Build Status Total Downloads

A self-hosted metrics and notifications platform for Laravel apps, Larametrics records and notifies you of changes made to models, incoming requests, and messages written to the log.

A full version of the docs can be found here, below you'll find a quick 'Getting Started' guide.

Screenshot of Larametrics Dashboard

Requirements

  • PHP 5.6.4 or higher
  • Laravel 5.2 or higher
  • guzzlehttp/guzzle (if notifications enabled)

Installation

Larametrics is installed as a standalone package through Composer:

composer require aschmelyun/larametrics

After Composer finishes up, you'll have to add the following line to your config/app.php file if you're not on Laravel 5.5 or higher:

Aschmelyun\Larametrics\LarametricsServiceProvider::class

Additionally, you'll want to get the config file copied over and add in the necessary database structure with:

php artisan vendor:publish --provider="Aschmelyun\Larametrics\LarametricsServiceProvider"
php artisan migrate

Note: Notifications use queued jobs when available to prevent delays in app response time. If you don't have this database table set up already for queues, run php artisan queue:table && php artisan migrate.

Displaying the Dashboard

Once you have the package tied in to your Laravel app, it starts collecting data based off of the default config file and storing it in your database. In order to view the dashboard associated with Larametrics and analyse your metrics and notifications, you'll need to add in a helper method to your routes file of choice.

\Aschmelyun\Larametrics\Larametrics::routes();

Include that where (and how) you want the dashboard to appear. For reference, all Larametrics routes are wrapped under a /metrics prefix, but you can adjust where you want the routes to appear.

In the following example, the Larametrics dashboard will only be viewable to people who are signed into the application, and visit /admin/metrics:

// routes/web.php
Route::group(['middleware' => 'auth', 'prefix' => 'admin'], function() {
    \Aschmelyun\Larametrics\Larametrics::routes();
});

Configuration

Configuring Larametrics for use within your Laravel app takes place mainly in the config/larametrics.php file. Each item is broken down in the comment lines above it, describing what that item does and what value(s) it's anticipating.

There are also two .env variables you'll need to set depending on if you use notifications:

  • LARAMETRICS_NOTIFICATION_EMAIL, the address that all email notifications will be routed to
  • LARAMETRICS_NOTIFICATION_SLACK_WEBHOOK, a Slack webhook configured for receiving requests and adding messages to a specified channel. More info here.

Additionally, there's a few other niche variables that you can set specifically for notifications. See a brief description of each below, or a more details on the documentation site.

  • LARAMETRICS_FROM_EMAIL, the email address that notifications will appear to be sent from
  • LARAMETRICS_FROM_NAME, the name that will appear alongside associated email notifications
  • LARAMETRICS_MODEL_SUBJECT, the subject of notification emails that arrive when models are created/updated/deleted
  • LARAMETRICS_LOG_SUBJECT, the subject of notification emails that arrive when an application log event is recorded
  • LARAMETRICS_ROUTE_SUBJECT, the subject of notification emails that arrive when a route has been visited

Roadmap

Larametrics is still in development, constantly being optimized and attempting to be made compatible for older Laravel versions. Here's what's on the path ahead:

  • Add the ability to ignore specific request paths
  • Integrate custom webhooks as a notification option
  • Move listeners out of root directory and into their own namespace
  • Optimize front-end for mobile devices
  • Expand on the notification filter options
  • Integrate Twilio for text message notifications
  • Optimize database querying for expired models to improve performance
  • Add Artisan commands for displaying Larametrics data
  • Add watcher for Queues
  • Add watcher for Scheduled Tasks
  • Compatibility for Laravel 4.2+

Difference to Laravel Telescope

In October 2018, Taylor Otwell announced Laravel Telescope, which acts as a debugging tool for Laravel applications. For a distinction between Larametrics and Telescope, please see this discussion here.

Contact Info

Have an issue? Submit it here! Want to get in touch? Feel free to reach out to me on Twitter for any kind of general questions or comments.

License

The MIT License (MIT). See LICENSE.md for more details.

Comments
  • Watching 404 Requests

    Watching 404 Requests

    Hey,

    I need to track 404 requests but with this architecture it does not seem to be possible because the callback given to Route::matched only executed when route exists. I guess watching 404s can be supported using middleware. What do you think? Would you accept if I pr for it?

    Thanks

    enhancement 
    opened by 0xK4d1r 9
  • No Logs

    No Logs

    The database table doesn't seem to be adding rows as per my log. I can see under my storage/logs/laravel.log that it has recent contain, including errors.

    I've followed the installation process so: composer installing, publishing the vendor and migrating. Everything else works perfectly fine. Only thing maybe worth noting a lot of my logic is in my own namespace although I still have and use App.

    I have also played around with the config, logsWatched is true as per default.

    opened by MylesKingsnorth98 8
  • LarametricsModel create function

    LarametricsModel create function

    The following command assumes that the model has id column as the primary key, while it can be generic sometimes, such as user_id or uuid.

    $larametricsModel = LarametricsModel::create([
                    'model' => get_class($event),
                    'model_id' => $event->getAttributes()['id'],
                    ...
    ]);
    

    It will produce Undefined index: id error.

    bug 
    opened by josteph 5
  • Illuminate\Database\QueryException on composer require

    Illuminate\Database\QueryException on composer require

    When running composer require aschmelyun/larametrics on a fresh Laravel (v6.11.0) installation, the application crashes on Generating optimized autoload files:

    Also tested this on laravel 5.8.35, but the same error

    composer require aschmelyun/larametrics      
                                                                                                                                                                                                                                                                             6.11.0   16:59:44  
    Using version ^1.2 for aschmelyun/larametrics
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Package operations: 6 installs, 0 updates, 0 removals
      - Installing ralouphie/getallheaders (3.0.3): Loading from cache
      - Installing psr/http-message (1.0.1): Loading from cache
      - Installing guzzlehttp/psr7 (1.6.1): Loading from cache
      - Installing guzzlehttp/promises (v1.3.1): Loading from cache
      - Installing guzzlehttp/guzzle (6.5.2): Loading from cache
      - Installing aschmelyun/larametrics (v1.2): Loading from cache
    guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
    Writing lock file
    Generating optimized autoload files
    > Illuminate\Foundation\ComposerScripts::postAutoloadDump
    > @php artisan package:discover --ansi
    
       Illuminate\Database\QueryException  : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'offset 0' at line 1 (SQL: select `id` from `larametrics_logs` order by `created_at` desc offset 0)
    
      at /Users/eilander/code/larametrics/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
        665|         // If an exception occurs when attempting to run a query, we'll format the error
        666|         // message to include the bindings with SQL, which will make this exception a
        667|         // lot more helpful to the developer instead of just the database's errors.
        668|         catch (Exception $e) {
      > 669|             throw new QueryException(
        670|                 $query, $this->prepareBindings($bindings), $e
        671|             );
        672|         }
        673|
    
      Exception trace:
    
      1   Illuminate\Foundation\Bootstrap\HandleExceptions::handleException(Object(Illuminate\Database\QueryException))
          [internal]:0
    
      2   PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'offset 0' at line 1")
          /Users/eilander/code/larametrics/vendor/laravel/framework/src/Illuminate/Database/Connection.php:331
    
      Please use the argument -v to see more details.
    
    
    opened by denniseilander 4
  • Not logging errors

    Not logging errors

    I can't get the logging functionality to work. I've created a fresh project with composer create-project laravel/laravel (Laravel 5.8) and added this package. Followed the install instructions.

    If I manually log a message it shows up correctly (\Log::info('Henlo fren')).

    My routes file:

    <?php
    \Aschmelyun\Larametrics\Larametrics::routes();
    
    Route::get('/', function () {
        \Log::info('Henlo fren');
        dd($fop);
        return view('welcome');
    });
    

    Output in storage/logs/laravel-2019-09-13.log:

    [2019-09-13 06:14:19] local.ERROR: Undefined variable: fop {"exception":"[object] (ErrorException(code: 0): Undefined variable: fop at /Users/nivv/projects/moppe/routes/web.php:18)
    [stacktrace]
    #0 /Users/nivv/projects/moppe/routes/web.php(18): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'Undefined varia...', '/Users/nivv/pr...', 18, Array)
    #1 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\\Routing\\RouteFileRegistrar->{closure}()
    #2 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Route.php(179): Illuminate\\Routing\\Route->runCallable()
    #3 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Router.php(680): Illuminate\\Routing\\Route->run()
    #4 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #5 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #6 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #7 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #8 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(75): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #9 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #10 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #11 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #12 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #13 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #14 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #15 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #16 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #17 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #18 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #19 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #20 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #21 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #22 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #23 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #24 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Router.php(682): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
    #25 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Router.php(657): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
    #26 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Router.php(623): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
    #27 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Router.php(612): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
    #28 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
    #29 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
    #30 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #31 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #32 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #33 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #34 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #35 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #36 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #37 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #38 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #39 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #40 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #41 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #42 /Users/nivv/projects/moppe/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #43 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #44 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #45 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #46 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
    #47 /Users/nivv/projects/moppe/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
    #48 /Users/nivv/projects/moppe/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
    #49 /Users/nivv/.composer/vendor/laravel/valet/server.php(158): require('/Users/nivv/pr...')
    #50 {main}
    "} 
    

    Error message in the browser: Skärmklipp 2019-09-13 08 15 11

    Larametrics dashboard: Skärmklipp 2019-09-13 08 14 25

    bug 
    opened by nivv 4
  • ErrorException thrown with message

    ErrorException thrown with message "strlen() expects parameter 1 to be string, array given

    ErrorException thrown with message "strlen() expects parameter 1 to be string, array given (View: /var/www/app/vendor/aschmelyun/larametrics/src/resources/views/models/model.blade.php)"

    Stacktrace: 63 ErrorException in /var/www/app/storage/framework/views/f2f7220de6dd744bad0044effb02ec116874f5a4.php:42 62 ErrorException in /var/www/app/storage/framework/views/f2f7220de6dd744bad0044effb02ec116874f5a4.php:42 61 Illuminate\Foundation\Bootstrap\HandleExceptions:handleError in /var/www/app/storage/framework/views/f2f7220de6dd744bad0044effb02ec116874f5a4.php:42 60 include in /var/www/app/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:43 59 Illuminate\View\Engines\PhpEngine:evaluatePath in /var/www/app/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:59 58 Illuminate\View\Engines\CompilerEngine:get in /var/www/app/vendor/laravel/framework/src/Illuminate/View/View.php:142 57 Illuminate\View\View:getContents in /var/www/app/vendor/laravel/framework/src/Illuminate/View/View.php:125 56 Illuminate\View\View:renderContents in /var/www/app/vendor/laravel/framework/src/Illuminate/View/View.php:90 55 Illuminate\View\View:render in /var/www/app/vendor/laravel/framework/src/Illuminate/Http/Response.php:42 54 Illuminate\Http\Response:setContent in /var/www/app/vendor/symfony/http-foundation/Response.php:202 53 Symfony\Component\HttpFoundation\Response:__construct in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:747 52 Illuminate\Routing\Router:toResponse in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:719 51 Illuminate\Routing\Router:prepareResponse in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:679 50 Illuminate\Routing\Router:Illuminate\Routing{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 49 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/zizaco/entrust/src/Entrust/Middleware/EntrustRole.php:42 48 Zizaco\Entrust\Middleware\EntrustRole:handle in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151 47 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 46 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php:43 45 Illuminate\Auth\Middleware\Authenticate:handle in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151 44 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 43 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 42 Illuminate\Routing\Middleware\SubstituteBindings:handle in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151 41 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 40 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:75 39 Illuminate\Foundation\Http\Middleware\VerifyCsrfToken:handle in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151 38 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 37 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49 36 Illuminate\View\Middleware\ShareErrorsFromSession:handle in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151 35 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 34 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:63 33 Illuminate\Session\Middleware\StartSession:handle in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151 32 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 31 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37 30 Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse:handle in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151 29 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 28 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:66 27 Illuminate\Cookie\Middleware\EncryptCookies:handle in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151 26 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 25 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 24 Illuminate\Pipeline\Pipeline:then in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:681 23 Illuminate\Routing\Router:runRouteWithinStack in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:656 22 Illuminate\Routing\Router:runRoute in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:622 21 Illuminate\Routing\Router:dispatchToRoute in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php:611 20 Illuminate\Routing\Router:dispatch in /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176 19 Illuminate\Foundation\Http\Kernel:Illuminate\Foundation\Http{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 18 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/fideloper/proxy/src/TrustProxies.php:57 17 Fideloper\Proxy\TrustProxies:handle in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151 16 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 15 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31 14 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151 13 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 12 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:31 11 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151 10 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 9 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 8 Illuminate\Foundation\Http\Middleware\ValidatePostSize:handle in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151 7 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 6 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62 5 Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode:handle in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151 4 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 3 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 2 Illuminate\Pipeline\Pipeline:then in /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151 1 Illuminate\Foundation\Http\Kernel:sendRequestThroughRouter in /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 0 Illuminate\Foundation\Http\Kernel:handle in /var/www/app/public/index.php:55

    bug 
    opened by Mohammed-Daud 4
  • Can we exclude some requests to specific routes?

    Can we exclude some requests to specific routes?

    We can exclude larametrics requests but what if we would like to exclude some other requests. Like LOGIN requests where we should not log users' password?

    enhancement 
    opened by tanmuhittin 3
  • logsWatched config doesn't stop logs being recorded

    logsWatched config doesn't stop logs being recorded

    Hi,

    If I set the logsWatched config value to false it doesn't actually stop anything being recorded in the database. It does change the dashboard index view to "Latest Model Changes" instead of "Latest Log Changes" but that's all it does.

    opened by dellow 3
  • Cannot redeclare uses() error

    Cannot redeclare uses() error

    Hi,

    I get this error when I clear the config cache in my application:

    In web.php line 70:
    Cannot redeclare uses() (previously declared in 
    vendor/aschmelyun/larametrics/src/routes/web.php:68)
    
    opened by dellow 3
  • Documentation does not say anything about LARAMETRICS_FROM_EMAIL

    Documentation does not say anything about LARAMETRICS_FROM_EMAIL

    I've just updated the project and got +7k errors because of the new default FROM email that is [email protected], and I don't have this email registered in my SES account as a sender.

    Searching in the code I've found that now I can customize the sender email using the env variable LARAMETRICS_FROM_EMAIL. I couldn't find anything about it in the documentation.

    Besides that, I think it should be a config and not just an env variable.

    opened by thiagolcks 2
  • Laravel 6 requires laravel/helpers

    Laravel 6 requires laravel/helpers

    str_contains() and other helpers are now optional in Laravel 6. Could simply update the docs to say laravel/helpers is required for v6+.

    "All str_ and array_ helpers have been moved to the new laravel/helpers Composer package and removed from the framework. If desired, you may update all calls to these helpers to use the Illuminate\Support\Str and Illuminate\Support\Arr classes. Alternatively, you can add the new laravel/helpers package to your application to continue using these helpers:

    composer require laravel/helpers"

    https://laravel.com/docs/6.x/upgrade#helpers

    opened by camerontucker 2
  • Setup PHPunit and create first test

    Setup PHPunit and create first test

    1 - Set up PHPUnit and config phpunit.xml to use SQLite. 2 - change the LarametricLog model namespace from Model to model because the first letter of the folder name is not uppercase. 3 - write many simple tests for LarametricsLog

    if this approach is acceptable I can continue to complete all other class tests. what do you think about them?

    opened by falahatiali 0
  • models and notifications folder does not comply with psr-4 autoloading standards

    models and notifications folder does not comply with psr-4 autoloading standards

    Whenever Models or Notifications classes are accessed, following error is coming "Uncaught Error: Class "Aschmelyun\Larametrics\Models\LarametricsLog" not found in [Path to Project Folder]/vendor/aschmelyun/larametrics/src/LarametricsLogServiceProvider.php:24"

    This is due to class discovery issue with PSR-4 standards

    Please rename "models" to "Models" & "notifications" to "Notifications" in "src" directory

    I'm using Laravel 9 and PHP 8.1.2 Attaching the screenshot of composer dump-autoload Screenshot_20220811_194819

    opened by devshabeeb 0
  • Calling Any Model with wrong namespace

    Calling Any Model with wrong namespace

    Hello i wanna report some bug when iam using php 7.3 i get error

    Class 'Aschmelyun\Larametrics\Models\LarametricsModel' not found

    so i change in vendor path 'model' into 'Model'

    but in my local using php 7.4 its fine

    this is a bug or some thing wrong with?

    opened by derylihs 0
Releases(v1.2.1)
  • v1.2.1(Jan 23, 2020)

    Fixes a few issues (#59, #60) because I didn't wrap some DB calls in a conditional seeing if the vendor config file was published yet. Oops!

    Source code(tar.gz)
    Source code(zip)
  • v1.2(Jan 12, 2020)

    A whole bunch of new features (big and small) as well as some bug fixes that I took a while getting around to. Here's a fairly condensed list of what's been added:

    • Includes the laravel/helpers package for legacy str_contains method
    • On the models changes page, doesn't strip out special characters for language compatibility
    • Optimizes the front-end for better mobile experience
    • Adds a pop-up confirmation box when reverting model changes
    • Logs user ID to model changes if a user is authenticated
    • Adds a custom webhook notification method
    • Monitors and logs 404 errors
    • Updates documentation and README to include information about LARAMETRICS_FROM_EMAIL env variables
    • Organizes the code structure better and pulls functionality into proper listener/action classes
    Source code(tar.gz)
    Source code(zip)
  • 1.1.5(Sep 15, 2019)

  • 1.1.4(May 30, 2019)

  • 1.1.3(May 29, 2019)

  • 1.1.0(Oct 30, 2018)

    Compatibility updates with lower Laravel versions, switching from App\Http\Controllers\Controller to Illuminate\Routing\Controller. Additional bug fixes.

    Source code(tar.gz)
    Source code(zip)
Owner
Andrew Schmelyun
Full-Stack PHP Developer @Simucase, always working on side projects. I write articles and produce video tutorials on web development.
Andrew Schmelyun
Dashboard and code-driven configuration for Laravel queues.

Introduction Horizon provides a beautiful dashboard and code-driven configuration for your Laravel powered Redis queues. Horizon allows you to easily

The Laravel Framework 3.5k Jan 6, 2023
The Prometheus monitoring system and time series database.

Prometheus Visit prometheus.io for the full documentation, examples and guides. Prometheus, a Cloud Native Computing Foundation project, is a systems

Prometheus 46.2k Jan 1, 2023
Simple library that abstracts different metrics collectors. I find this necessary to have a consistent and simple metrics (functional) API that doesn't cause vendor lock-in.

Metrics Simple library that abstracts different metrics collectors. I find this necessary to have a consistent and simple metrics API that doesn't cau

Benjamin Eberlei 311 Nov 20, 2022
Relational Metrics - lararvel package help you to make your metrics easier

Relational Metrics This package will help you to make your metrics easier, You could get metrics about your Models, Models depending on their relation

Syrian Open Source 25 Oct 12, 2022
Manage self-hosted Google Fonts in Laravel apps

This package makes self-hosting Google Fonts as frictionless as possible for Laravel users. To load fonts in your application, register a Google Fonts embed URL and load it with the @googlefonts Blade directive.

Spatie 386 Dec 19, 2022
Self-hosted platform to keep and share your content: web links, posts, passwords and pictures.

Shaark is a self-hosted platform to keep and share your content: web links, posts, passwords and pictures. All of your data can be private, public or

MarceauKa 482 Dec 30, 2022
Self-hosted CMS platform based on the Laravel PHP Framework.

October is a Content Management System (CMS) and web platform whose sole purpose is to make your development workflow simple again. It was born out of

October CMS 10.8k Jan 4, 2023
Free, open-source, self-hosted CMS platform based on the Laravel PHP Framework.

Winter is a Content Management System (CMS) and web platform whose sole purpose is to make your development workflow simple again. It was born out of

Winter CMS 1.1k Jan 3, 2023
Self-hosted CMS platform based on the Laravel PHP Framework.

October is a Content Management System (CMS) and web platform whose sole purpose is to make your development workflow simple again. It was born out of

October CMS 10.8k Jan 1, 2023
Self-hosted CMS platform based on the Laravel PHP Framework.

October is a Content Management System (CMS) and web platform whose sole purpose is to make your development workflow simple again. It was born out of

October CMS 10.8k Dec 30, 2022
Private, self-hosted Composer/Satis repository with unlimited private and open-source packages and support for Git, Mercurial, and Subversion.

Private, self-hosted Composer/Satis repository with unlimited private and open-source packages and support for Git, Mercurial, and Subversion. HTTP API, HTTPs support, webhook handler, scheduled builds, Slack and HipChat integration.

Łukasz Lach 112 Nov 24, 2022
Quickly deploy a seedbox with self-hosted services and a web portal using Docker and docker-compose.

Seedbox Quickly deploy and configure a seedbox with self-hosted services and a web portal using Docker and a single docker-compose.yml file. Screensho

null 6 Dec 7, 2022
SendPortal - Open-source self-hosted email marketing, subscriber and list management, email campaigns and more

SendPortal includes subscriber and list management, email campaigns, message tracking, reports and multiple workspaces/domains in a modern, flexible and scalable application.

Mettle 1.2k Jan 4, 2023
Gestor de Contraseñas basado en Laravel 8 + PHP 8 + MySQL 8. Self-hosted Password Manager based on Laravel 8 + PHP 8 + MySQL 8.

English Gestor de Contraseñas Esta aplicación permite una gestión completa de contraseñas para múltiples tipos de servicios (web, ssh, teléfonos, wifi

Lito 134 Jan 2, 2023
EBook-Apps - The eBook Apps is a web application that helps you browse ebooks from anywhere using your smartphone and laptop.

⚡️ eBook Apps The eBook Apps is a web application that helps you browse ebooks from anywhere using your smartphone and laptop. ?? Getting Started To s

Ahmad Fauzy 32 Nov 14, 2022
Self hosted project management and collaboration tool powered by TALL stack

Sponsored By: Self hosted project management and collaboration tool inspired by basecamp. Notice: Project under some major change, do not use until st

iluminar 1.8k Jan 6, 2023
A toolkit for using self-hosted Natural Language Processing with Elasticsearch and WordPress

Natural Language Processing Tools for WordPress A toolkit for using self-hosted Natural Language Processing in WordPress This plugin is a Proof of Con

Ricardo Moraleida 8 Dec 23, 2022
A self hosted download manager for movie and tv show trailers.

Introduction Trailarr is a self hosted download manager for movie and tv show trailers. Features: A beautiful, easy to use UI. Easy setup, readily con

null 13 Dec 19, 2022
An open source self hosted notes and bookmarks taking web app.

Benotes An open source self hosted web app for your notes and bookmarks side by side. This project is currently in Beta. You may encounter bugs or err

null 264 Jan 2, 2023
Basic anonymous and registered upload storage for temporary share file self hosted.

TMPShareX Basic anonymous and registered upload storage for temporary share file self hosted. Server Requirement PHP 7.4.8 [Support PHP 8] Nginx 1.19.

Sandy Hermansyah 1 Feb 3, 2022