Configuring Failure Flags
This page explains how to configure the Failure Flags sidecar. Gathering your configuration details now will make it easier to deploy Failure Flags in the next step. Failure Flags supports two configuration methods:
- Using environment variables (recommended), and
- Using a configuration file.
This page covers configuration options that are common to all platforms.
Common configuration options
The following table lists each option with its corresponding environment variable and configuration file property.
| Environment variable | Config file property | Description |
FAILURE_FLAGS_ENABLED |
Set to true, or 1to enable the Failure Flags SDK in your application. If you’re using Failure Flags by proxy, you don't need to set this variable. |
|
GREMLIN_METRICS_EXCLUDE_HEALTH_CHECK_PATHS |
metrics_exclude_health_check_paths |
A comma-separated list of URL paths that you want to exclude from metrics collection. This is primarily for excluding paths used for Health Checks. |
GREMLIN_METRICS_OPT_OUT |
metrics_opt_out |
Set to true if you do not want the sidecar to collect metrics. |
GREMLIN_SIDECAR_ENABLED |
Set to true, yes, or 1to enable the Failure Flags sidecar. If this is unset or set to any other value, the sidecar will operate in NOOP mode. |
|
GREMLIN_TEAM_ID |
team_id |
Your Gremlin Team ID. This and other credential details are available in the Gremlin web app. |
GREMLIN_TEAM_CERTIFICATE |
team_certificate |
Set to the contents of your Gremlin Team certificate. This and other credential details are available in the Gremlin web app. You can preserve newlines using the |
GREMLIN_TEAM_PRIVATE_KEY |
team_private_key |
Set to the contents of your Gremlin Team private key. This and other credential details are available in the Gremlin web app. You can preserve newlines using the |
SERVICE_NAME |
service_name |
Set to the name of the service as you want it to appear in Gremlin. Service names can only contain alphanumeric characters, hyphens, and underscores, and must be less than 64 characters long. This variable is required for Kubernetes, but can be detected automatically on other platforms. This variable has lower precedence than detected names from AWS such as AWS_LAMBDA_FUNCTION_NAME or ECS_SERVICE_NAME. |
GREMLIN_DEBUG |
debug |
Set to true to generate additional logging for troubleshooting |
GREMLIN_TRACE |
trace |
Set to true to add detailed network tracing information of the sidecar's connection to the Gremlin control plane |
Setting targeting labels
You can set custom labels (i.e., tags) to uniquely identify deployments of your software for targeting. Custom labels can be set by either using environment variables or in your configuration file.
Using environment variables, labels are variables containing the prefix GREMLIN_LABEL_. The text following this prefix will be set as the label's key, and the value will be set to the variable’s value. For example, the following variable will result in the label ENVIRONMENT: Production:
Using configuration files, add a list of key-value pairs to the labels property:
Using a configuration file
Gremlin supports YAML files for file-based configuration. When using a configuration file, the following environment variables are required:
| Environment variable | Description |
FAILURE_FLAGS_ENABLED |
Set to true, or 1to enable the Failure Flags SDK in your
application. |
GREMLIN_SIDECAR_ENABLED |
Set to true, yes, or 1to enable Failure-Flags-Sidecar. If unset or set
to any other value Failure-Flags-Sidecar will operate in NOOP mode. |
GREMLIN_CONFIG_FILE |
Set to the fully qualified path of the file containing your Failure Flags configuration. |
Example configuration file
Importing configuration values from files or ARNs
For some configuration options, you can retrieve their values from files deployed with the sidecar container, or from AWS services by using Amazon Resource Names (ARNs). These options are denoted by the suffixes _FILE or _ARN. You can use these options in place of their base option in the above table. Gremlin supports secretsmanager secrets and ssm parameter ARNs.
| Environment variable | Config file property | Description |
GREMLIN_CONFIG_FILE |
If your config file is included in your container, this is the fully qualified path of the file containing your Failure Flags configuration. | |
GREMLIN_CONFIG_ARN |
If your config file is hosted e.g. in AWS Secrets Manager, this is the Amazon Resource Name (ARN)of
the resource containing your configuration file. If you must assume a different role at runtime to access that
resource, you can specify that IAM role using GREMLIN_CONFIG_ARN_ROLE. |
|
GREMLIN_CONFIG_ARN_ROLE |
The ARN of an IAM role for the sidecar to assume when it reads the resources in GREMLIN_CONFIG_ARN. Only needed if the sidecar's default role can't read those resources. |
|
GREMLIN_TEAM_CERTIFICATE_FILE |
team_certificate_file |
If your team certificate file is included in your container, this is its fully qualified path. |
GREMLIN_TEAM_CERTIFICATE_ARN |
team_certificate_arn |
If your team certificate is hosted e.g. in AWS Secrets Manager, this is the Amazon Resource Name (ARN)of
the resource containing your certificate. If you must assume a different role at runtime to access that
resource, you can specify that IAM role using GREMLIN_CONFIG_ARN_ROLE. |
GREMLIN_TEAM_PRIVATE_KEY_FILE |
team_private_key_file |
If your private key file is included in your container, this is its fully qualified path. |
GREMLIN_TEAM_PRIVATE_KEY_ARN |
team_private_key_arn |
If your private key is hosted e.g. in AWS Secrets Manager, this is the Amazon Resource Name (ARN)of
the resource containing your key. If you must assume a different role at runtime to access that resource, you
can specify that IAM role using GREMLIN_CONFIG_ARN_ROLE. |
For example, this configuration uses a file in the sidecar for the team certificate and an AWS ARN for the team private key:
Advanced configuration options
| Environment variable | Config file property | Description |
GREMLIN_HTTPS_PROXY |
https_proxy |
If your application reaches its network dependencies through a corporate proxy, set this to the URI of the proxy for only those requests for Gremlin management (e.g. traffic to api.gremlin.com). |
GREMLIN_DEPENDENCY_HTTPS_PROXY |
dependency_https_proxy |
If your application's dependencies are behind a corporate proxy, and you need outgoing requests for your application to pass through that proxy after transiting the gremlin proxy, set this to the URI of the corporate proxy. |
GREMLIN_DEPENDENCY_NO_PROXY |
dependency_no_proxy |
Alongside GREMLIN_DEPENDENCY_HTTPS_PROXY, this can be used to specify a comma separated list
of hosts or ips that will bypass secondary proxies when exiting the gremlin proxy (eg. NO_PROXY=localhost,127.0.0.1,*.internal.corp,10.0.0.0/8).
Note: matching is suffix based, ports are optional, and whitespace is trimmed |
GREMLIN_CUSTOM_ROOT_CERTIFICATE |
ssl_cert |
If your company uses a proxy with a self-signed TLS certificate, set this to the contents of the root
Certificate Authority (CA) certificate. This option has corresponding |
GREMLIN_CUSTOM_ROOT_CERTIFICATE_BUNDLE_FILE |
ssl_trust_cert_bundle_file |
If your company uses a private Public Key Infrastructure (PKI), set this to the path of the file containing
the full certificate chain. This option has a corresponding _ARNoption
(ssl_trust_cert_bundle_arn in the config file) |
GREMLIN_API_ENDPOINT_URL |
api_endpoint_url |
The Gremlin API endpoint to use. This is only needed when using Gremlin Private Edition.
The default endpoint is https://api.gremlin.com/v1/ff |
GREMLIN_PROXY_MAX_CONNS |
proxy_max_conns |
The maximum number of TCP connections to open with the upstream backend that the failure-flags-sidecar proxies on ingress traffic. Any new connections over this configured maximum are queued until other requests finish. When unspecified, the failure-flags-sidecar uses unlimited connections. NOTE: When a non-zero value is configured on this field, failure-flags-sidecar will not force upstream connections to use HTTP2. This configuration does not provide any effective cap on concurrent HTTP2 requests. |
GREMLIN_PROXY_MAX_IDLE_CONNS |
proxy_max_idle_conns |
The maximum number of idle TCP connections failure-flags-proxy will maintain with the upstream backend that the failure-flags-sidecar proxies on ingress traffic. When unspecified, failure-flags-sidecar defaults to 100 |
GREMLIN_INGRESS_PROXY_PASS_HOST_HEADER |
ingress_proxy_pass_host_header |
Decides whether the failure-flags-sidecar rewrites the Host header to match the upstream backend. When true, no Host header rewriting happens. When false, the Host header is rewritten to match the configured upstream backend, e.g. from Host: my-app.cluster.local:80 to Host: localhost:8080. The default value is true (no rewriting) |
GREMLIN_LAMBDA_NEXT_EXEC_WRAPPER |
Optional. The path to another exec wrapper that the Gremlin bootstrap script runs after it sets AWS_LAMBDA_RUNTIME_API, for example /opt/dynatrace. To chain more than one, separate the paths with :. Requires AWS_LAMBDA_EXEC_WRAPPER to be /opt/bootstrap. Available in sidecar v2.10.0 and later. |
|
GREMLIN_LAMBDA_FAIL_CLOSED |
Lambda extension only. Set to true, yes, or 1 to make the extension exit, instead of running in NOOP mode, when it's enabled but can't connect to Gremlin (for example, because of invalid credentials). Extensions that are deliberately turned off still run in NOOP mode. |
|
GREMLIN_REFRESH_INTERVAL |
refresh_interval |
How often the sidecar checks Gremlin for active experiments, as a duration such as 30s or 2m. The minimum is 30s. Values below the minimum, or values that can't be parsed, fall back to the default. Defaults to 1m. |
GREMLIN_REQUEST_TIMEOUT |
request_timeout |
The timeout for requests from the sidecar to the Gremlin API, as a duration such as 500ms or 2s. Increase this if your network path to Gremlin is slow, for example through a corporate proxy. Defaults to 500ms. |
GREMLIN_SIDECAR_PORT |
sidecar_port |
The address and port that the sidecar listens on for requests from the Failure Flags SDK, in host:port form. Defaults to localhost:5032. |
GREMLIN_OBSERVE_BUFFER_SIZE |
observe_buffer_size |
The number of Failure Flag observations the sidecar queues before it reports them to Gremlin. When the queue is full, new observations are dropped. Experiments still run normally. Increase this for services that evaluate a very large number of flags. Defaults to 1024. |
GREMLIN_PPROF_PORT |
pprof_port |
For troubleshooting only. Set this to an address and port to start a Go pprof profiling server, for example localhost:6060. The host must be localhost, 127.0.0.1, or ::1, or the server won't start. This server is off by default. |
GREMLIN_INGRESS_PROXY_ENABLED
|
ingress_proxy_enabled
|
Set to true to enable the reverse proxy for inbound traffic.
|
GREMLIN_INGRESS_PROXY_PORT
|
ingress_proxy_port
|
Set to the port number that the ingress proxy will bind to (e.g., :5035).
|
GREMLIN_INGRESS_PROXIED_ENDPOINT
|
ingress_proxied_endpoint
|
The URL of your application. This is required.
For AWS ECS, set this to |
GREMLIN_INGRESS_SERVICE_CERTIFICATE |
ingress_service_certificate |
Optional. A PEM-encoded server certificate (or chain) for the ingress proxy. Setting a certificate turns on TLS for the ingress proxy. Set only one of ingress_service_certificate, ingress_service_certificate_file, or ingress_service_certificate_arn. |
GREMLIN_INGRESS_SERVICE_CERTIFICATE_FILE |
ingress_service_certificate_file |
Optional. The path to a file that contains the PEM-encoded server certificate (or chain). |
GREMLIN_INGRESS_SERVICE_CERTIFICATE_ARN |
ingress_service_certificate_arn |
Optional. The ARN of an AWS Secrets Manager secret or SSM Parameter Store parameter that contains the PEM-encoded server certificate (or chain). |
GREMLIN_INGRESS_SERVICE_PRIVATE_KEY |
ingress_service_private_key |
Required if you set a certificate. The PEM-encoded private key that matches the server certificate. Set only one of ingress_service_private_key, ingress_service_private_key_file, or ingress_service_private_key_arn. |
GREMLIN_INGRESS_SERVICE_PRIVATE_KEY_FILE |
ingress_service_private_key_file |
Optional. The path to a file that contains the PEM-encoded private key. |
GREMLIN_INGRESS_SERVICE_PRIVATE_KEY_ARN |
ingress_service_private_key_arn |
Optional. The ARN of an AWS Secrets Manager secret or SSM Parameter Store parameter that contains the PEM-encoded private key. |
Running Failure Flags behind a proxy
If the Failure Flags sidecar is running on a private network (e.g. behind a corporate firewall), you can configure the sidecar to connect to the Gremlin Control Plane via a proxy.
You can use the following options to configure your proxy settings:
| Environment variable | Config file property | Description |
GREMLIN_HTTPS_PROXY |
https_proxy |
If your application reaches its network dependencies through a corporate proxy, set this to the URI of the proxy for only those requests for Gremlin management (e.g. traffic to api.gremlin.com). |
GREMLIN_DEPENDENCY_HTTPS_PROXY |
dependency_https_proxy |
If your application's dependencies are behind a corporate proxy, and you need outgoing requests for your application to pass through that proxy after transiting the gremlin proxy, set this to the URI of the corporate proxy. |
GREMLIN_HTTP_PROXY |
http_proxy |
The same as GREMLIN_HTTPS_PROXY, but for http:// requests to Gremlin. This only applies to the sidecar's traffic to Gremlin, not to your application's traffic. |
GREMLIN_DEPENDENCY_HTTP_PROXY |
dependency_http_proxy |
The same as GREMLIN_DEPENDENCY_HTTPS_PROXY, but for http:// requests. HTTPS requests don't fall back to this value, so if one corporate proxy handles both, set both variables. |
GREMLIN_DEPENDENCY_NO_PROXY |
dependency_no_proxy |
Alongside GREMLIN_DEPENDENCY_HTTPS_PROXY, this can be used to specify a comma separated list
of hosts or ips that will bypass secondary proxies when exiting the gremlin proxy (eg. NO_PROXY=localhost,127.0.0.1,*.internal.corp,10.0.0.0/8).
Note: matching is suffix based, ports are optional, and whitespace is trimmed |
GREMLIN_CUSTOM_ROOT_CERTIFICATE |
ssl_cert |
If your company uses a proxy with a self-signed TLS certificate, set this to the contents of the root Certificate Authority (CA) certificate. |
GREMLIN_CUSTOM_ROOT_CERTIFICATE_FILE |
ca_cert_file |
The fully qualified path to a file containing the root CA certificate. Use this instead of GREMLIN_CUSTOM_ROOT_CERTIFICATE. |
GREMLIN_CUSTOM_ROOT_CERTIFICATE_ARN |
ca_cert_arn |
The ARN of a resource, such as an AWS Secrets Manager secret, that contains the root CA certificate. Use this instead of GREMLIN_CUSTOM_ROOT_CERTIFICATE. |
GREMLIN_CUSTOM_ROOT_CERTIFICATE_BUNDLE_FILE |
ssl_trust_cert_bundle_file |
If your company uses a private Public Key Infrastructure (PKI), set this to the path of the file containing the full certificate chain. |
GREMLIN_CUSTOM_ROOT_CERTIFICATE_BUNDLE_ARN |
ssl_trust_cert_bundle_arn |
The ARN of a resource, such as an AWS Secrets Manager secret, that contains the full certificate chain. Use this instead of GREMLIN_CUSTOM_ROOT_CERTIFICATE_BUNDLE_FILE. |
Client TLS Identity for Mutual TLS (mTLS)
The Failure Flags sidecar supports setting a TLS identity to enable mutual TLS (mTLS). You can use the following options to configure mTLS:
| Environment variable | Config file property | Description |
GREMLIN_HTTPS_PROXY |
https_proxy |
If your application reaches its network dependencies through a corporate proxy, set this to the URI of the proxy for only those requests for Gremlin management (e.g. traffic to api.gremlin.com). |
GREMLIN_CLIENT_CERTIFICATE |
client_certificate |
A PEM-encoded certificate chain, starting with the leaf certificate, and followed by its intermediates. This option has corresponding _FILE and _ARN options (in the config file, these are client_certificate_file and client_certificate_arn respectively). |
GREMLIN_CLIENT_PRIVATE_KEY |
client_private_key |
A PEM-encoded private key. This option has corresponding _FILE and _ARN options (in the config file, these are client_private_key_file and client_private_key_arn respectively). |

