Sha256: 6eec9c11d379fd05ecaa8eff945beba0cdc72215b17e6f22cc1059131f668416

Contents?: true

Size: 866 Bytes

Versions: 20

Compression:

Stored size: 866 Bytes

Contents

require 'prometheus/client/registry'
require 'prometheus/client/mmaped_value'
require 'prometheus/client/page_size'
require 'logger'
require 'tmpdir'

module Prometheus
  module Client
    class Configuration
      attr_accessor :value_class, :multiprocess_files_dir, :initial_mmap_file_size, :logger, :pid_provider, :rust_multiprocess_metrics

      def initialize
        @value_class = ::Prometheus::Client::MmapedValue
        @initial_mmap_file_size = ::Prometheus::Client::PageSize.page_size(fallback_page_size: 4096)
        @logger = Logger.new($stdout)
        @pid_provider = Process.method(:pid)
        @rust_multiprocess_metrics = ENV.fetch('prometheus_rust_multiprocess_metrics', nil) == 'true'
        @multiprocess_files_dir = ENV.fetch('prometheus_multiproc_dir') do
          Dir.mktmpdir("prometheus-mmap")
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
prometheus-client-mmap-0.25.0 lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.25.0-x86_64-linux lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.25.0-x86_64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.25.0-arm64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.25.0-aarch64-linux lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.5 lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.5-x86_64-linux lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.5-x86_64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.5-arm64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.5-aarch64-linux lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.4 lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.4-x86_64-linux lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.4-x86_64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.4-arm64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.4-aarch64-linux lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.3 lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.3-x86_64-linux lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.3-x86_64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.3-arm64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-0.24.3-aarch64-linux lib/prometheus/client/configuration.rb