Download the PHP package hellofresh/stats-php without Composer

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

hellofresh/stats-php

codecov

Generic Stats library written in PHP

This is generic stats library that we at HelloFresh use in our projects to collect services' stats and then create monitoring dashboards to track activity and problems.

Supported PHP versions

stats-php version 1.x supports the following PHP version: 7.0, 7.1, 7.2. If you are going to use the library with newer PHP versions - consider using version 2.x+.

Since version 2.x, this library start using the built-in intl PHP extension instead of behat/transliterator

Key Features

Dependencies

Version 1.x

Version 2.x

Installation

Usage

Instance creation

Connection DSN has the following format: <type>://<connection params>/<connection path>?<connection options>.

Count metrics manually

Generalise resources by type and stripping resource ID

In some cases you do not need to collect metrics for all unique requests, but a single metric for requests of the similar type, e.g. access time to concrete users pages does not matter a lot, but average access time is important. hellofresh/stats-php allows HTTP Request metric modification and supports ID filtering out of the box, so you can get generic metric get.users.-id- instead thousands of metrics like get.users.1, get.users.13, get.users.42 etc. that may make your graphite suffer from overloading.

To use metric generalisation by second level path ID, you can pass HelloFresh\Stats\HTTPMetricAlterCallback\HasIDAtSecondLevel instance to HelloFresh\Stats\Client::setHTTPMetricAlterCallback(). Also there is a builder method HelloFresh\Stats\HTTPMetricAlterCallback\HasIDAtSecondLevel::createFromStringMap() that builds a callback instance from string map, so you can get these values from config. It accepts a list of sections with test callback in the following format: <section>:<test-callback-name>. You can use either double colon or new line character as section-callback pairs separator, so all of the following forms are correct:

Currently the following test callbacks are implemented:

You can register your own test callback functions using the HelloFresh\Stats\HTTPMetricAlterCallback\HasIDAtSecondLevel::registerSectionTest() instance method or the second parameter of builder method - builder method validates test callback functions against the registered list.


All versions of stats-php with dependencies

PHP Build Version
Package Version
Requires php Version >= 7.0
psr/http-message Version ^1.0
behat/transliterator Version ^1.2
psr/log Version ^1.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 hellofresh/stats-php contains the following files

Loading the files please wait ....