Apisonator has some options that can be configured using a configuration file.
When using container images built from the openshift
directory, we can tune
the same parameters using environment variables. This document describes those
variables.
- Redis data storage
- Redis queues
- Integration with Porta
- Logging
- Prometheus metrics
- OpenTelemetry
- Feature flags
- Async
- Performance
- Cron
- Analytics
- External error reporting
- Redis URL for the data DB.
- Optional. Defaults to
redis://localhost:6379
. - Applies to: listener, worker, cron.
- Format: string.
- Redis user name
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: string.
- Redis password
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: string.
- Whether use SSL to connect to Redis
- Optional. Defaults to not set
- Will be considered
true
when the URL schema isrediss
- Applies to: listener, worker, cron.
- Format:
true
orfalse
.
- Certification authority to validate Redis server TLS connections with
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: path to file as string.
- The path to the client SSL certificate
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: path to file as string.
- The path to the client SSL private key
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: path to file as string.
- URL of Redis sentinels.
- Optional. Required only when using a Redis cluster with sentinels.
- Applies to: listener, worker, cron.
- Format: list of URLs separated by
,
.
- Sentinels user name
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: string.
- Sentinels password
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: string.
- Asks the sentinel for the URL of the master or a slave.
- Optional. Defaults to
master
. Applies only when using a Redis cluster with sentinels. - Applies to: listener, worker, cron.
- Format:
master
orslave
.
- Connect timeout.
- Optional. Defaults to
5
. - Applies to: listener, worker, cron.
- Format: integer (seconds).
- Read timeout.
- Optional. Defaults to
3
. - Applies to: listener, worker, cron.
- Format: integer (seconds).
- Write timeout.
- Optional. Defaults to
3
. - Applies to: listener, worker, cron.
- Format: integer (seconds).
- Max number of connections.
- Optional. Defaults to
10
. - Applies to: listener, worker, cron.
- Format: integer (seconds).
- Redis URL for the queues DB.
- Required when
RACK_ENV
is nottest
ordevelopment
. Defaults toredis://localhost:6379
in those 2 environments. - Applies to: listener, worker, cron.
- Format: string.
- Redis user name
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: string.
- Redis password
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: string.
- Whether use SSL to connect to Redis
- Optional. Defaults to not set
- Will be considered
true
when the URL schema isrediss
- Applies to: listener, worker, cron.
- Format:
true
orfalse
.
- Certification authority certificate Redis should trust to accept TLS connections
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: path to file as string.
- User certificate to connect to Redis through TLS
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: path to file as string.
- User key to connect to Redis through TLS
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: path to file as string.
- URL of Redis sentinels.
- Optional. Required only when using a Redis cluster with sentinels.
- Applies to: listener, worker, cron.
- Format: list of URLs separated by
,
.
- Sentinels user name
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: string.
- Sentinels password
- Optional. Defaults to not set.
- Applies to: listener, worker, cron.
- Format: string.
- Asks the sentinel for the URL of the master or a slave.
- Optional. Defaults to
master
. Applies only when using a Redis cluster with sentinels. - Applies to: listener, worker, cron.
- Format:
master
orslave
.
- Connect timeout.
- Optional. Defaults to
5
. - Applies to: listener, worker, cron.
- Format: integer (seconds).
- Read timeout.
- Optional. Defaults to
3
. - Applies to: listener, worker, cron.
- Format: integer (seconds).
- Write timeout.
- Optional. Defaults to
3
. - Applies to: listener, worker, cron.
- Format: integer (seconds).
- Max number of connections.
- Optional. Defaults to
10
. - Applies to: listener, worker, cron.
- Format: integer (seconds).
- The user needed when sending requests to the internal API.
- Required when
RACK_ENV
isproduction
, optional otherwise. - Applies to: listener.
- Format: string.
- The password needed when sending requests to the internal API.
- Required when
RACK_ENV
isproduction
, optional otherwise. - Applies to: listener.
- Format: string.
- Webhook that Apisonator uses to send events to Porta.
- Required. If not provided, certain features like alerting will not work.
- Applies to: worker.
- Format: string.
- Password needed to authenticate against the webhook that Apisonator uses to send events to Porta.
- Required. If not provided, certain features like alerting will not work.
- Applies to: worker.
- Format: string.
- The service ID of the master account in Porta.
- Optional. If not provided, Apisonator does not report metrics to the master account of Porta.
- Applies to: listener, worker.
- Format: string.
- Name of the metric configured in the master account of Porta to track the
number of report calls. Applies only when
CONFIG_MASTER_SERVICE_ID
is set. - Optional. Defaults to
transactions
. - Applies to: listener.
- Format: string.
- Name of the metric configured in the master account of Porta to track the
number of authorize calls. Applies only when
CONFIG_MASTER_SERVICE_ID
is set. - Optional. Defaults to
transactions/authorize
. - Applies to: listener.
- Format: string.
- Log path to write logs that are not request logs, like some kind of warnings.
- Optional. Defaults to
/dev/stdout
. - Applies to: listener, worker, cron.
- Format: string.
- The format for request logs.
- Optional. Defaults to
text
. - Applies to: listener.
- Format: the options are
text
,json
, andtext,json
. The last one will print the logs in both formats.
- Log path to write job logs (runtime, type of job, etc.)
- Optional. Defaults to
/dev/stdout
. - Applies to: worker.
- Format: string.
- The format for the worker logs.
- Optional. Defaults to
text
. - Applies to: worker.
- Format: the options are
text
andjson
.
- Enables prometheus metrics on the listener.
- Optional. Defaults to
false
. - Applies to: listener.
- Format:
true
orfalse
.
- Port of the Prometheus metrics server of the listener.
- Optional. Defaults to
9394
. - Applies to: listener.
- Format: integer.
- Enables prometheus metrics on the worker.
- Optional. Defaults to
false
. - Applies to: worker.
- Format:
true
orfalse
.
- Port of the Prometheus metrics server of the worker.
- Optional. Defaults to
9394
. - Applies to: worker.
- Format: integer.
- Enables OpenTelemetry instrumentation
- Optional. Defaults to
false
. - Applies to: listener.
- Format:
true
orfalse
.
- Selects the implementation of the referrer filter validator. When set to true, the validator behaves like an old version of the filter. This should only be used in Apisonator instances witch customers that rely on that behaviour.
- Optional. Defaults to
false
. - Applies to: listener.
- Format:
true
orfalse
.
- Enables the async mode.
- Optional. Defaults to
false
. - Applies to: listener, worker, cron.
- Format:
true
orfalse
.
- Max number of jobs in the reactor.
- Optional. Defaults to
20
. Applies only whenCONFIG_REDIS_ASYNC=true
. - Applies to: worker.
- Format: integer.
- Max number of jobs in memory pending to be added to the reactor.
- Optional. Defaults to
100
. Applies only whenCONFIG_REDIS_ASYNC=true
. - Applies to: worker.
- Format: integer.
- Seconds to wait before fetching more jobs when the number of jobs in memory has reached max_pending_jobs.
- Optional. Defaults to
0.01
. Applies only whenCONFIG_REDIS_ASYNC=true
. - Applies to: worker.
- Format: float (in seconds).
- Apisonator creates NotifyJobs to update the
transactions
andtransactions/authorize metrics
. This env defines how many updates include on each job. - Optional. Defaults to
10000
. - Applies to: listener.
- Format: integer.
- Number of worker processes of the listener.
- Optional. Defaults to the
number of CPUs * 8
. - Applies to: listener.
- Format: integer.
- Same as
LISTENER_WORKERS
.
- Frequency of the task that reschedules failed jobs.
- Optional. Defaults to
300
. - Applies to: cron.
- Format: integer (seconds).
- How often to delete the stats of deleted services.
- Optional. Defaults to
86400
(one day). - Applies to: cron.
- Format: integer (seconds).
- Used to enable/disable some features, mainly it's used to expose some functions that are only useful when running the test suite.
- Optional: defaults to
development
. - Applies to: listener, worker, cron.
- Format:
development
,test
,production
. When set to any other value, it will act asdevelopment
. Also, the error reporting service might use this to distinguish betweenproduction
andstaging
for example.
- External error reporting service to use.
- Optional. Does not report errors by default.
- Applies to: listener, worker, cron.
- Format: Only "bugsnag" supported.
- The API key used to authenticate against the service configured with
CONFIG_HOPTOAD_SERVICE
. - Optional. Empty by default.
- Applies to: listener, worker, cron.
- Format: string.