承接 one-content/prometheus 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

one-content/prometheus

Composer 安装命令:

composer require one-content/prometheus

包简介

This is Prometheus Module for One Content

README 文档

README

Installation

composer require one-content/prometheus

Configuration

The package has a default configuration which uses the following environment variables.

PROMETHEUS_NAMESPACE=app

PROMETHEUS_METRICS_ROUTE_ENABLED=true
PROMETHEUS_METRICS_ROUTE_PATH=metrics
PROMETHEUS_METRICS_ROUTE_MIDDLEWARE=null

PROMETHEUS_STORAGE_ADAPTER=memory

REDIS_HOST=localhost
REDIS_PORT=6379
PROMETHEUS_REDIS_PREFIX=PROMETHEUS_

To customize the configuration file, publish the package configuration using Artisan.

php artisan vendor:publish --provider="OneContent\Prometheus\PrometheusServiceProvider"

You can then edit the generated config at app/config/prometheus.php.

Storage Adapters

The storage adapter is used to persist metrics across requests. The memory adapter is enabled by default, meaning data will only be persisted across the current request. We recommend using the redis or apc adapter in production environments. The PROMETHEUS_STORAGE_ADAPTER env var is used to specify the storage adapter.

If redis is used, the REDIS_HOST and REDIS_PORT vars also need to be configured.

Exporting Metrics

The package adds a /metrics end-point, enabled by default, which exposes all metrics gathered by collectors.

This can be turned on/off using the PROMETHEUS_METRICS_ROUTE_ENABLED var, and can also be changed using the PROMETHEUS_METRICS_ROUTE_PATH var.

If you would like to protect this end-point, you can write any custom middleware and enable it using PROMETHEUS_METRICS_ROUTE_MIDDLEWARE.

统计信息

  • 总下载量: 100
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-06-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固