Statistics Follow
Statistic data on service and app runs is available in your ServiceManager -> Admin -> Statistics.
Note: service calls made by ServiceTester or AuraTester are excluded from any statistics.
Period & logs
The top of the screen displays the period filter and the log download buttons.
Period
You may filter the displayed data to the last day, last 7 days, last month, or custom date range.
You may display all available data by selecting 'Custom' -> Edit -> and resetting the date range.
Logs
Admin Log | Downloads the system log (same log as in Admin -> View Log -> Download), filtered to the selected period. |
Execution Log | Downloads the Execution Log, that lists all logged service calls. Available in Txt or CSV format - the CSV format is more detailed (see bellow). |
Reset | Resets the Statistics and Execution Log. Everything will be gone. |
Categories
The statistics view is split into several categories:
Summary
This section is a top-level view of your system:
- Service successes: successes and failures of all services.
A success/failure is determined by the 'success' flag in the service's response. - App runs: number of app sessions, per app.
An app session starts when the user opens the app, until the user exists the app (closes the tab). - Users (Unique): number of unique users, per app.
The username is determined by the latest service invoked by the app, that has one of the input fields listed in EXECUTION_LOG_USERNAME_FIELDS (see more details bellow).
Service runs without app will by listed as "(No App)". - Devices: distribution of app sessions by device: Android, iOS, Desktop or other.
Unrecognized devices or app runs without User-Agent will be classified as 'Other'.
Day by day / Week by week
This category is only available when the selected period is 'Last 24 hours' or 'Last 7 days'.
Displays the changes in success/failures rate, app runs, and users:
- day by day, for the last 4 days (when period='Last 24 hours') OR
- week by week, for the last 4 weeks (when period='Last 7 days').
The last column will always match to the last period that is displayed in the 'Summary' section.
App Runs
The 'App Runs' table displays detailed data by app.
The 'Runs Total' and 'Unique Users' match to the 'App Runs' and 'Users/App' in the 'Summary' section.
- Actions -> Execution Log: downloads the Execution Log - filtered for that app, and (optionally) filtered by user.
- Actions -> Services: scrolls to the "Service Calls" table (described bellow), and filters it to the services of the clicked app.
- Click on app's name: (same as Actions -> Services).
Apps with 0 calls will be omitted from this table.
Service Runs
The 'Service Runs' section displays statistics by service.
You may view all service calls, or only service calls by a specific app (=calls for services used by the app AND originated from the app. Calls to a service used by the app but not by the app won't be counted).
Response time chart
The chart displays the service response times.
Failures will be marked with red vertical lines, you may click on a point to view additional details.
Service Failures
The "Failures" table displays service failures - of all services or per selected service.
Also when an app is selected, the failures will be filtered to service runs within the scope of the app.
You may use the filer fields bellow the column names to filter the displayed rows.
Click on the "Details" button (teal) to open the Service Log Details dialog:
Click on the "App Log" or "Service Log" buttons (purple) to download the log:
- Service Log: filters the log for this run of this service.
- App Log: filters the log for the run of this service and all other services that ran under the same app session.
Execution Log - CSV
The Execution Log lists all service calls - this is the raw data that is used for all statistic calculations.
It may be downloaded it via 'Execution Log' button -> CSV, and opened via Excel or any other CSV viewer:
The first line is always a header line that describes the various columns:
Timestamp | Timestamp for this service call (upon finishing execution). |
IP | IP of the caller. Services called by a JavaScript service will be marked as 'internal'. |
Device | Android, iOS, or Desktop. Determined by the User-Agent sent to the service call. |
Browser | Edge, IE, Chrome, Firefox, or Safari. This statistic is not displayed in the UI. |
User |
Username, determined by EXECUTION_LOG_USERNAME_FIELDS (see bellow). |
App | Name of the app (if the service call was made within a context of an app). |
AppRunId | Identifies a transaction/session of an app. 1) An app will receive it per session in the initial metadata request. 2) A service on the server side that didn’t receive this Id, will allocate it. It will be propagated to: a) All the services that continue the same sessionId. b) From a javaScript service to all the services it calls. |
ServiceRunId | Identifies a transaction/session of a service. ServiceRunId will be allocated by a service, and propagated to: a) All the services that continue the same sessionId. b) From a javaScript service to all the services it calls. |
Service | Name of the service. |
SessionId | sessionId of partial services playback. |
Response Time | Time it took to run the service. |
IsSuccess | Y or FAIL. (see bellow) |
Error | Simplified error message. It tries to extract it from the response. This field is empty if the service was a success. |
Response | Full response of the service. This field is empty if the service was a success. |
Input | Input that the service received. This field is empty if the service was a success. |
Configuration
Expiration / Cleanup
The statistics will be cleaned up once a day, when the daily agent runs.
Statistics older than EXECUTION_LOG_EXPIRATION_DAYS will be deleted.
EXECUTION_LOG_EXPIRATION_DAYS is configured in the System Properties.
You may configure EXECUTION_LOG_EXPIRATION_DAYS=-1 in order to disable statistics (no new statistics will be written).
Username fields
The EXECUTION_LOG_USERNAME_FIELDS property in System Properties sets the names of input parameters that may contain the username field.
When a service runs, the statistics logger tries to match one of the EXECUTION_LOG_USERNAME_FIELDS to the input fields of the service (in the order provided in EXECUTION_LOG_USERNAME_FIELDS property).
The value of the first field that matches will be used as the username for that service.
This determined username is only used for statistics purposes.
Non-visualizer apps
AppVisualizer apps automatically receive and report the AppName & AppTransactionId.
Apps developed without the AppVisualizer may support these statistics by:
- Acquiring AppTransactionId: when the app starts, it should fire a HTTP GET request to the following endpoint in order to receive a transaction ID for the current session of the app.
http://localhost:8080/ServiceManager/Macro/AppMetadata
The newly allocated AppTransactionId will be returned in the response: response.data.transactionId. - Reporting meta.app=<appName>[,<transactionId>]: with every service call your app performs, it should include the meta.app query key. The value of this key should be the AppName OR the AppName+Comma+TransactionId.
For example: /ServiceManager/Macro/ExecMacro/MyLoginService?meta.app=MyApp,A123456
Note: transactionId is required for the 'Users/App' and 'Users (Unique)' charts.
With this, the statistics system will be able to classify the AppName and AppRunId (transactionId) for service calls that your app performs.
Success/Failure of a service
For now, a success/failure is determined by the 'success' value in service's response.
Comments
0 comments
Please sign in to leave a comment.