Tracing Apps Using Jaeger

Flogo apps provide an implementation of the OpenTracing framework using the Jaeger backend. The Flogo app binary is built with Jaeger implementation and can be enabled by setting the FLOGO_APP_MONITORING_OT_JAEGER environment variable to true. You can track how the flow went through, the execution time for each Activity, or in case of failure, the cause of the failure.

Each app is displayed as a service in the Jaeger UI. In a Flogo app, each flow is one operation (trace) and each Activity in the flow is a span of the trace. A trace is the complete lifecycle of a group of spans. The flow is the root span and its activities are its child spans.

 

Prerequisites: The following prerequisites must be met before using the tracing capability in Flogo Enterprise:
  • By default, Jaeger is not enabled in Flogo, hence tracing is not enabled. To enable Jaeger, set the FLOGO_APP_MONITORING_OT_JAEGER environment variable to true.
  • Ensure that the Jaeger server is installed, running, and accessible to the Flogo app binary.
  • If your Jaeger server is running on a machine other than the machine on which your app resides, be sure to set the JAEGER_ENDPOINT=http://<JAEGER_HOST>:<HTTP_TRACE_COLLECTOR_PORT>/api/traces environment variables. Refer to the Environment Variables page for the environment variables that you can set.

Flogo Enterprise-Related Tags in Jaeger

In OpenTracing, each trace and span have their tags. Tags are useful for filtering traces, for example, if you want to search for a specific trace or time interval.

Note: Adding your custom tags for any one span (Activity) only is currently not supported. Any custom tags that you create are added to all spans and traces.

Flogo Enterprise introduces the following Flogo-specific tags:

For flows
flow_nameName of the flow
flow_id Unique instance IDs that are generated by the Flogo engine. They are used to identify specific instances of a flow (such as when the same flow is triggered multiple times)
For activities
flow_nameName of the flow
flow_idUnique instance IDs that are generated by the Flogo engine. They are used to identify specific instances of a flow (such as when the same flow is triggered multiple times)
task_nameName of Activity
taskInstance_id

Unique instance ID that is generated by the Flogo engine. This identity is used to identify the specific instance of an Activity when an Activity is iterated multiple times. This ID is used in looping constructs such as iterator or Repeat while true.

For subflows
parent_flowName of the parent flow
parent_flow_idUnique ID of the parent flow
flow_nameName of the subflow
flow_idUnique instance IDs that are generated by the Flogo engine. They are used to identify specific instances of a flow (such as when the same flow is triggered multiple times)

The tag values are automatically generated by the Flogo Enterprise runtime. You cannot override the default values. You have the option to set custom tags by setting them in the environment variable JAEGER_TAGS as key/value pair. Keep in mind that these tags are added to all spans and traces.

Refer to the Environment Variables page for the environment variables that you can set.