Download the PHP package shifudeen/elastic-apm-laravel without Composer

On this page you can find all versions of the php package shifudeen/elastic-apm-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package elastic-apm-laravel

Elastic APM

CircleCI Latest Stable Version License

Elastic APM agent for v2 intake API. Compatible with Laravel 5.5+.

Transactions list Transaction detail

Installation

Require this package with composer:

composer require shifudeen/elastic-apm-laravel

Add the ServiceProvider class to the providers array in config/app.php:

From here, we will take care of everything based on your configuration. The agent and the middleware will be registered, and transactions will be sent to Elastic.

Agent configuration

The following environment variables are supported in the default configuration:

Variable Description
APM_ACTIVE true or false defaults to true. If false, the agent will collect, but not send, transaction data; span collection will also be disabled.
APM_ACTIVE_CLI true or false defaults to true. If false, the agent will not collect or send transaction or span data for non-HTTP requests but HTTP requests will still follow APM_ACTIVE. When APM_ACTIVE is false, this will have no effect.
APM_APPNAME Name of the app as it will appear in APM. Invalid special characters will be replaced with a hyphen.
APM_APPVERSION Version of the app as it will appear in APM.
APM_SERVERURL URL to the APM intake service.
APM_SECRETTOKEN Secret token, if required.
APM_USEROUTEURI true or false defaults to true. The default behavior is to record the URL as defined in your routes configuration. Set to false to record the requested URL, but keep in mind that this can result in excessive unique entries in APM.
APM_IGNORE_PATTERNS Ignore specific routes or jobs by transaction name. Should be a regular expression, and will match multiple patterns via pipe \| in the regex. Note that 4 backslashes should be used to match a single backslash. Example: "/\/health-check\|^OPTIONS \|Foo\\\\Bar\\\\Job/"
APM_QUERYLOG true or false defaults to 'true'. Set to false to completely disable query logging, or to auto if you would like to use the threshold feature.
APM_THRESHOLD Query threshold in milliseconds, defaults to 200. If a query takes longer then 200ms, we enable the query log. Make sure you set APM_QUERYLOG=auto.
APM_BACKTRACEDEPTH Defaults to 25. Depth of backtrace in query span.
APM_MAXTRACEITEMS Defaults to 1000. Max number of child items displayed when viewing trace details.

You may also publish the elastic-apm-laravel.php configuration file to change additional settings:

Once published, open the config/elastic-apm-laravel.php file and review the various settings.

Collectors

The default collectors typically listen on events to measure portions of the request such as framework loading, database queries, or jobs.

The SpanCollector in particular allows you to measure any section of your own code via the ApmCollector Facade:

To record an additional span around your job execution, you may include the provided job middleware (Laravel 6+ only https://laravel.com/docs/6.x/queues#job-middleware):

Add a collector for other events

You can add extra collector(s) to listen to your own application events or Laravel events like Illuminate\Mail\Events\MessageSending for example. We created a base collector that already includes functionality to measure events, that you can extend from:

Don't forget to register your collector when the application starts:

Development

Get Composer. Follow the instructions defined on the official Composer page, or if you are using homebrew, just run:

Install project dependencies:

Run the unit test suite:

Please adhere to PSR-2 and Symfony coding standard. Run the following commands before pushing your code:


All versions of elastic-apm-laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
illuminate/database Version ^5.5|^6|^7
illuminate/http Version ^5.5|^6|^7
illuminate/routing Version ^5.5|^6|^7
illuminate/support Version ^5.5|^6|^7
philkra/elastic-apm-php-agent Version master
jasny/dbquery-mysql Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shifudeen/elastic-apm-laravel contains the following files

Loading the files please wait ....