Enabling Application Metrics
Set the FLOGO_HTTP_SERVICE_PORT environment variable to point to the port number of the HTTP service that provides APIs for collecting the application metrics. This will enable the runtime HTTP service.
Procedure
Enabling statistics collection using environment variables
To enable metrics collection through environment variable, do the following. FLOGO_APP_METRICS must be sepcified:
Procedure
Examples that shows how to retrieve specific metrics for an app
The following is an example of how you would run the above steps for a fictitious app named REST_Echo.
FLOGO_HTTP_SERVICE_PORT=7777 FLOGO_APP_METRICS=true ./REST_Echo-darwin-amd64
curl -X GET http://localhost:7777/app/metrics/flows
{"app_name":"REST_Echo","app_version":"1.0.0","flows":[{"created":127639,"completed":126784,"failed":0,"avg_exec_time":0,"min_exec_time":0,"max_exec_time":4,"flow_name":"PostBooks"}]}
curl -X GET http://localhost:7777/app/metrics/flow/PostBooks/activities
{"app_name":"REST_Echo","app_version":"1.0.0","tasks":[{"created":127389,"completed":126908,"failed":0,"avg_exec_time":0,"min_exec_time":0,"max_exec_time":4,"flow_name":"PostBooks","task_name":"Return"}]}
Copyright © Cloud Software Group, Inc. All rights reserved.
