Tracing Apps Using Jaeger
Flogo Enterprise provides an implementation of the OpenTracing framework using the Jaeger backend. In
Flogo Enterprise, 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, 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 Flogo Enterprise, 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.
- By default, Jaeger is not enabled in Flogo, hence tracing is not enabled. To enable Jaeger, set the
FLOGO_APP_MONITORING_OT_JAEGERenvironment variable totrue. - Ensure that the Jaeger server is installed, running, and accessible to Flogo Enterprise.
- If your Jaeger server is running on a machine other than the machine on which your app resides, be sure to set the
JAEGER_AGENT_HOSTand theJAEGER_AGENT_PORTJAEGER_ENDPOINT=http://<JAEGER_HOST>:<HTTP_TRACE_COLLECTOR_PORT>/api/tracesenvironment variables. Refer to the https://github.com/jaegertracing/jaeger-client-go#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 own tags. Tags are useful for filtering traces, for example if you want to search for a specific trace or time interval.
Flogo Enterprise introduces the following Flogo-specific tags:
| For flows | |
flow_name | Name 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_name | Name 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) |
task_name | Name of activity |
taskInstance_id | Unique instance ID that are 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_flow | Name of the parent flow |
parent_flow_id | Unique ID of the parent flow |
flow_name | Name of the subflow |
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) |
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 https://github.com/jaegertracing/jaeger-client-go#environment-variables page for the environment variables that you can set.