New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

prometheus_enumerated_store

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prometheus_enumerated_store

  • 1.0.0.184486
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Enumerated File Store

Gem Version Gem YARD

coverage quality outdated vulnerable

Enumerated File Store - это гем для реализации специального Data Store для библиотеки prometheus-client.

Данная библиотека решает проблему огромного числа файлов-метрик при использовании стандартного DirectFileStore


Enumerated File Store provides custom Data Store for prometheus-client library.

It fixes issue with too many files for long running applications when using DirectFileStore.

Возможности / Features

Библиотека использует последовательное присвоение номеров файлам метрик вместо использования PID / It uses sequential numbering for metric filenames instead of PID-stamps.

Начало работы / Getting started

gem install prometheus-enumerated-store

При установке prometheus_enumerated_store через bundler добавьте следующую строку в Gemfile:


If you'd rather install prometheus_enumerated_store using bundler, add a line for it in your Gemfile:

gem 'prometheus_enumerated_store'

Затем выполните / Then run:

bundle install # для установки гема / gem installation

Использование / Usage

Для использования необходимо в каком-нибудь файле config/initializers/ настроить Data Store для библиотеки prometheus-client:


Now you need to set Data Store for prometheus-client gem somewhere in config/initializers/:

Prometheus::Client.config.data_store = Prometheus::Enumerated::Store.new(dir: Rails.root.join('tmp', 'prometheus_metrics'))

if defined?(PhusionPassenger)
  PhusionPassenger.on_event(:starting_worker_process) do |_forked|
    Prometheus::Client.config.data_store.reset
  end
end


# Or somewhere in Pum config if any:

on_restart do
  Prometheus::Client.config.data_store.reset
end

on_worker_boot do
  Prometheus::Client.config.data_store.reset
end

Лицензия / License

Библиотека доступна с открытым исходным кодом в соответствии с условиями лицензии MIT.


The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 15 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc