Logging App Metrics

You can record app metrics of flows and activities to the console logs. To enable the logging of app metrics, use the following environment variables:

Environment Variable Name Default Values Description
FLOGO_APP_METRICS_LOG_EMITTER_ENABLE False This property can be set to either True or False:
  • True: App metrics are displayed in the logs with the values set in FLOGO_APP_METRICS_LOG_EMMITTER_CONFIG.
  • False: App metrics are not displayed in the logs.

If this variable is not provided, the default values are used.

FLOGO_APP_METRICS_LOG_EMITTER_CONFIG Both flow and Activity This property can be set to either flow level or Activity level. The format for setting the property is:

{"interval":"<interval_in_seconds>","type":["flow","Activity"]}

where:

  • interval is the time interval (in seconds) after which the app metrics are displayed in the console.
  • type is the level at which the app metrics are to be displayed - flow or Activity. Depending on which level you set, the app metrics are displayed only for that level.

For example:

{"interval":"1s","type":["flow","Activity"]}

For a list of fields or app metrics returned in the response, refer to Fields returned in the response.