Skip to content

endclothing/prometheus_client_php

Repository files navigation

A prometheus client library written in PHP

Build Status

This uses redis to do the client side aggregation. We recommend to run a local redis instance next to your PHP workers.

Usage

see example.php

Development

Dependencies

  • PHP 5.6
  • PHP redis extension
  • Composer
  • Redis

Start a redis instance:

docker run -d --name redis -p 6379:6379 redis

Run the tests:

composer install

# when redis is not listening on localhost:
# export REDIS_HOST=192.168.59.100
./vendor/bin/phpunit

Black box testing

Just start the nginx, fpm & redis setup with docker-compose:

docker-compose up
vendor/bin/phpunit tests/Test/BlackBoxTest.php

About

Prometheus instrumentation library for PHP applications

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 99.7%
  • Dockerfile 0.3%