Download the PHP package michaelesmith/metric-data without Composer

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

Build Status

What is it?

This is a library that allows for easy abstraction of metric data collection and storage, allowing it to be stored locally or via external API.

Installation

composer require "michaelesmith/metric-data"

All About Metrics

For this library all data points are referred to as metrics and used via MetricData\Metric\MetricInterface which defines 3 required methods getDateTime(), getType() and getData(). You can implement the interface to define your own metrics based on your specific business logic but a few basic implementations are provided in:

Basic Storage Examples

This section will walk through examples for each of the storage types. In these examples when a child sotrage is needed a NullStorage is generally used for illustration.

Closure

This storage allows you to quickly integrate virtually any backend via a closure. It is till recommend in most case to create a full blown extension class once you prototype the system and are ready for production.

Delayed

This storage allows you to queue up metric data during a request and the flush them to another storage, which will allow you to delay the possibly long processing time until after the response has been sent to the user.

File

This storage will store the metrics in a JOSN encoded file. This can be usefully for testing or if you want to process the events in mass with some other tool out of band of the user request / response cycle.

KeenIO

This storage allows you to send metric data to the KeenIO API.

Logging

This storage will log to a PSR-3 logger before passing the metric to a child storage.

Memory

This storage is not particularly useful in production but is very fast when used in a testing environment while still allowing for the storing of events to be tested.

Multiple

This storage allows metrics to be sent to multiple child storages.

Null

This storage is the equivalent of /dev/null, any metric stored here will simple disappear into the ether. Not useful for production but can be used in scenarios where you don't need to store metrics like unit tests.

Advanced Storage Examples

While these storages can be used individually, their power comes from the ability to combine them to build powerful functionality specific to the needs of different application environments but which can easily interchange allowing the application to be unaware of the particular configuration.

Development

Testing

Production

Contributing

Have an idea to make something better? Submit a pull request. Need integration of some other backend service? Build it. I would be happy to add a link here. PR's make the open source world turn. :earth_americas: :earth_asia: :earth_africa: :octocat: Happy Coding!


All versions of metric-data with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
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 michaelesmith/metric-data contains the following files

Loading the files please wait ....