Environment Variables

This topic lists the environment variables associated with the Flogo Extension for VS Code runtime environment.

Environment Variable Name Default Values Description
FLOGO_RUNNER_QUEUE_SIZE 50 The maximum number of events from all triggers that can be queued by the app engine.
FLOGO_RUNNER_WORKERS 5 The maximum number of concurrent events that can be executed by the app engine from the queue.
FLOGO_LOG_LEVEL INFO

Used to set a log level for the Flogo app. Supported values are:

  • INFO

  • DEBUG

  • WARN

  • ERROR

This variable is supported for Remote Apps managed with the TIBCO Cloud Integration Hybrid Agent.

FLOGO_LOGACTIVITY_LOG_LEVEL INFO

Used to control logging in the Log activity. Values supported, in order of precedence, are:

  • DEBUG

  • INFO

  • WARN

  • ERROR

For example:

  • If the log level is set to WARN, WARN and ERROR logs are filtered and displayed.

  • If the log level is set to DEBUG, then DEBUG, INFO, WARN, and ERROR logs are displayed.

FLOGO_MAPPING_SKIP_MISSING FALSE

When mapping objects if one or more elements are missing in either the source or target object, the mapper generates an error when FLOGO_MAPPING_SKIP_MISSING is set to FALSE.

Set this environment variable to true if you want to return a null instead of receiving an error.

FLOGO_APP_MEM_ALERT_THRESHOLD 70 The threshold for memory utilization of the app. When the memory utilization by an app running in a container exceeds the threshold that you have specified, you get a warning log
FLOGO_APP_CPU_ALERT_THRESHOLD 70 The threshold for CPU utilization of the app. When the CPU utilization by an app running in a container exceeds the threshold that you have specified, you get a warning log.
FLOGO_APP_DELAYED_STOP_INTERVAL 10 seconds

When you scale down an instance, all inflight jobs are lost because the engine is stopped immediately. To avoid losing the jobs, delay the stopping of the engine by setting the FLOGO_APP_DELAYED_STOP_INTERVAL variable to a value less than 60 seconds. Here, when you scale down the instance, if there are no inflight jobs running, then the engine stops immediately without any delay. In case of inflight jobs:

If there are any inflight jobs running, then the engine stops immediately after the inflight job is completed.

If the inflight job is not completed within a specified time interval, then the job gets killed and the engine stops.

GOGC 100

Sets the initial garbage collection target percentage. Setting it to a higher value delays the start of a garbage collection cycle until the live heap has grown to the specified percentage of the previous size. Setting it to a lower value causes the garbage collector to be triggered more often as less new data can be allocated to the heap before triggering a collection.

This section lists the user-defined environment variables that are associated with the Flogo Extension for VS Code runtime environment.

Environment Variable Description
FLOGO_MAPPING_OMIT_NULLS

Used to omit all the keys in the activity input evaluating to null.

The supported values are TRUE and FALSE.

FLOGO_FLOW_CONTROL_EVENTS

If you set FLOGO_FLOW_CONTROL_EVENTS as TRUE, the Flow limit functionality is enabled. Whenever the incoming requests to trigger reach the FLOGO_ RUNNER_QUEUE_SIZE limit, the trigger is paused.

When all the requests currently under processing are finished, the trigger is resumed again. The connectors that support the Flow limit functionality have details in the topics. For more information on connectors, see Supported Flogo Connectors.

FLOGO_HTTP_SERVICE_PORT Used to set the port number to enable runtime HTTP service, which provides APIs for health check and statistics.
FLOGO_LOG_FORMAT Used to switch the logging format between text and JSON. For example, to use the JSON format, set FLOGO_LOG_FORMAT=JSON ./<app-name>
FLOGO_MAX_STEP_COUNT

The application stops processing requests after the FLOGO_MAX_STEP_COUNT limit is reached.

The default limit is set to 10 million even when you do not add this variable.

FLOGO_EXPOSE_SWAGGER_EP

If you set this property to TRUE, the Swagger endpoint is exposed. The Swagger of the Rest trigger app can be accessed by hitting the Swagger endpoint at http://<service-url>/api/v2/swagger.json

The supported values are TRUE and FALSE.

FLOGO_SWAGGER_EP

To customize the URI for the Swagger endpoint, set this environment variable to the desired endpoint.

For example, FLOGO_SWAGGER_EP=/custom/swagger/endpoint

This makes the Swagger endpoint available at /custom/swagger/endpoint instead of the default /api/v2/swagger.json location.

FLOGO_APPS_PROPS_CONSUL Specifies the Consul server address. For example, <server_address>:<http://127.0.0.1:8500>
FLOGO_APP_BUILD_CONFIG Set FLOGO_APP_BUILD_CONFIG=<path-to-file> in system environment variables to build Flogo executables with only the necessary dependencies. For more information, see Optimizing and Debugging the Flogo App Executable.
FLOGO_APP_BUILD_LOG If you set FLOGO_APP_BUILD_LOG=true in system environment variables and restart Visual Studio Code, you can enable build debug logs. For more information, see Optimizing and Debugging the Flogo App Executable.
FLOGO_APP_BUILD_TIMEOUT

Configures the application build timeout. The default value is 5m (minutes). Values can be set in seconds, minutes, and hours, for example, 30s, 2m, and 1h.

If the unit is not mentioned with the value, the default is m (minutes).

FLOGO_APP_PROP_RECONFIGURE

Specifies that app properties can be updated or overridden at runtime.

The supported values are TRUE and FALSE.

FLOGO_APP_PROP_SNAPSHOTS

Used along with FLOGO_APP_PROP_RECONFIGURE. If this variable is set to true, the app keeps the app properties the same for the entire flow. Even if you change the app properties while the flow is running, the new properties are effective only for new flows and not existing ones.

The supported values are TRUE and FALSE.

FLOGO_OTEL_SPAN_KIND

Used to specify the type of span to be used in OpenTelemetry. The supported values are INTERNAL, SERVER, CLIENT, PRODUCER, and CONSUMER.

Note: If no value or an invalid value is provided, the default value is set to INTERNAL.
FLOGO_LOG_CONSOLE_STREAM

Used to specify the logging output stream for Flogo engine and app logs. The supported values are stdout and stderr.

FLOGO_LOG_CTX

Used to enable context logging for the application. When set to TRUE, context, such as application name, version, tracing details, and flow details, is added to the engine and connectors logs.

The supported values are TRUE and FALSE.

Note: This context is always logged in JSON format.

FLOGO_LOG_CTX_FIELDS

When context logging is enabled, set custom context fields in the logging. These additional fields are added to the logging context.

For example, FLOGO_LOG_CTX_FIELDS=”service.name=Foo,service.version=1.0.0,service.environment=dev”

FLOGO_APP_METRICS_PROMETHEUS_LABELS

Used to set custom labels in the Flogo Prometheus metrics.

For example, FLOGO_APP_METRICS_PROMETHEUS_LABELS=”environment=dev,job=api-server”

FLOGO_ENV Used to set the name of the deployment environment, such as dev, staging, and production. When enabled, by default, the deployment.environment field is set in the logging context (if enabled) and in Flogo OpenTelemetry traces and metrics.