Download the PHP package perfbase/laravel without Composer

On this page you can find all versions of the php package perfbase/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 laravel

Perfbase for Laravel

Packagist License Packagist Version GitHub Actions Workflow Status

Seamless Laravel integration for Perfbase - a comprehensive Application Performance Monitoring (APM) solution that provides real-time insights into your Laravel application's performance, database queries, HTTP requests, queue jobs, and more.

Features

Requirements

Installation

1. Install the Package

2. Install the Perfbase PHP Extension

The ext-perfbase PHP extension is required. Install it using:

Important: Restart your web server after installation.

3. Publish Configuration

This creates config/perfbase.php with all available options.

4. Configure Environment

Add to your .env file:

5. Add Middleware (Optional but Recommended)

For HTTP request profiling, add the middleware to your HTTP kernel:

Or apply to specific route groups:

Configuration

Basic Configuration

The package auto-registers and provides several configuration options:

Environment Variables

Variable Default Description
PERFBASE_ENABLED false Enable/disable profiling
PERFBASE_API_KEY null Your Perfbase API key (required)
PERFBASE_SAMPLE_RATE 0.1 Sampling rate (0.0 to 1.0)
PERFBASE_SENDING_MODE sync Data sending mode (sync, file, database)
PERFBASE_TIMEOUT 5 API request timeout in seconds
PERFBASE_PROXY null HTTP proxy URL
PERFBASE_FLAGS Default flags Profiling feature flags

Sending Modes

Sync Mode (Default)

Data is sent immediately to Perfbase:

File Buffering

Data is stored in local files and sent later:

Database Buffering

Data is cached in your database and sent later:

Profiling Features Control

Control which profiling features are enabled:

Available flags:

Include/Exclude Filters

Control which routes, commands, and jobs are profiled:

Usage

Automatic Profiling

Once configured, Perfbase automatically profiles:

Manual Profiling

Use the facade for custom profiling:

Service Injection

Use dependency injection in your services:

User-Specific Profiling

Profile specific users by implementing the ProfiledUser interface:

Artisan Commands

Sync Buffered Data

When using file or database sending modes, use this command to send buffered data:

Clear Buffered Data

Remove all locally buffered traces:

Advanced Configuration

Database Strategy Setup

When using database sending mode, you may need to run the migration:

The package includes a migration for the perfbase_profiles table.

Custom Cache Paths

For file-based buffering, customize the storage path:

Performance Optimization

For high-traffic applications:

Multi-Environment Setup

Facade Methods

The Perfbase facade provides access to all SDK methods:

Method Description
startTraceSpan($name, $attributes = []) Start profiling a named span
stopTraceSpan($name) Stop profiling a named span
setAttribute($key, $value) Add attribute to current trace
setFlags($flags) Change profiling feature flags
submitTrace() Submit trace data to Perfbase
getTraceData($spanName = '') Get raw trace data
reset() Clear current trace session
isExtensionAvailable() Check if extension is loaded

Error Handling

The package handles errors gracefully:

Troubleshooting

Extension Not Found

Permission Issues (File Mode)

High Memory Usage

Database Issues (Database Mode)

Testing

When testing your Laravel application:

Performance Impact

Security Considerations

Examples

E-commerce Checkout

Background Job Processing

Documentation

Comprehensive documentation is available at https://docs.perfbase.com, including:

Contributing

We welcome contributions! Please see our contributing guidelines and feel free to submit pull requests.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

Support

License

This project is licensed under the Apache License 2.0. Please see the License File for more information.


Made with ❤️ by the Perfbase team


All versions of laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4 <8.5
ext-json Version *
ext-zlib Version *
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
perfbase/php-sdk Version ^0.3.0
guzzlehttp/guzzle Version ^7.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 perfbase/laravel contains the following files

Loading the files please wait ....