Download the PHP package adelinferaru/nestedflowtracker without Composer
On this page you can find all versions of the php package adelinferaru/nestedflowtracker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download adelinferaru/nestedflowtracker
More information about adelinferaru/nestedflowtracker
Files in adelinferaru/nestedflowtracker
Package nestedflowtracker
Short Description Laravel package that helps tracking nested execution flows.
License MIT
Homepage https://github.com/adelinferaru/nestedflowtracker
Informations about the package nestedflowtracker
NestedFlowTracker
This Laravel package allows metering the time spent from a start point to an end point in the code.
Take a look at contributing.md to see a to do list.
Installation
Via Composer
Configuration
1. Publish the configuration file
2. Publish migration files
3. Setup environmental variables
The package requires that you setup two environmental variables. Edit .env and add the following:
The **** variable represents the name of the current application and when the package is used to track a user flow that spans multiple applications it is very usefull in understanding which one of the applicantions was reporting a specific tracking record.
The **** variable will specify the name of the database connection used to write the tracking records to. If you are not using the , you must define, in , a new DB connection to be used by NestedFlowTracker.
Example:
Now in .env file you will have:
Usage
Mostly you will be using 2 class static methods:
$settings array might contain the following:
- tracker_id : the unique identifier of the whole flow (spanning multiple apps)
- user_id: the user_id of the user performing the flow or on whose behalf is the flow
- component: overwrite the default component/app name defined in the .env file when needed
- message: overwrite the message (usefull in ::endTask)
- context: specify a context
- result: pass in a result
- parent_id: programatically specify a the id of a parent tracker
Note: The method is returning a Model that is implementing the Nested Set.
Note: The startTrack / endTrack mark the begining and the end of SUB-FLOW.
When making an API call to another app that is part of the flow and might need to track its own internal flow, you can pass the following vars:
Change log
Please see the changelog for more information on what has changed recently.
Testing
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Feraru Ioan Adelin
- All Contributors
License
license. Please see the license file for more information.