Prometheus Sidecar v1.0.0 PrometheusSidecar.Env View Source
Helper module to get environment variables from the host application.
Most options can be set using either a System environment variable or an elixir configuration.
Link to this section Summary
Functions
Enable the ranch web server.
Extra socket options that are merged into the ranch http configuration.
Extra socket options that are merged into the ranch https configuration.
Get the current library version.
Sets max number of connections allowed on the ranch server.
Sets the port for the ranch web server.
Get the desired schema for the ranch web server.
Link to this section Functions
Specs
enable_server?() :: boolean()
Enable the ranch web server.
This option is similar to setting runtime: false for the dependency
in your mix.exs file but allows you to start and stop the server depending on the environment.
default value: true
Set using System env or elixir config:
PROMETHEUS_SIDECAR_ENABLE_SERVER=false
config :prometheus_sidecar, enable_server: false
Specs
http() :: keyword()
Extra socket options that are merged into the ranch http configuration.
See:
- ranch's TransportOpts for
ranch:child_spec(3) - ranch's socket_opts
- ranch_tcp transport module options
Specs
https() :: keyword()
Extra socket options that are merged into the ranch https configuration.
See:
- ranch's TransportOpts for
ranch:child_spec(3) - ranch's socket_opts
- :ranch_ssl transport module options
Specs
library_version() :: String.t()
Get the current library version.
Specs
max_connections() :: integer()
Sets max number of connections allowed on the ranch server.
default value: 16_384
See Plug.Cowboy's :transport_options
Set using System env or elixir config:
PROMETHEUS_SIDECAR_MAX_CONNECTIONS=1000
config :prometheus_sidecar, max_connections: 1000
Specs
port() :: integer()
Sets the port for the ranch web server.
default value: 5001
Set using System env or elixir config:
PROMETHEUS_SIDECAR_PORT=6001
config :prometheus_sidecar, port: 6001
Specs
scheme() :: atom()
Get the desired schema for the ranch web server.
default value: :http
This will always return :http unless there is a value for the :https option.
This option can only be set using an elixir config:
config :prometheus_sidecar, https: [keyfile: "/dev.key", certfile: "/dev.crt"]