Action logging and anonymous analytics

Starting with ACLI Release 9.4, we have added an option to log information for each action run. We have also implemented support to anonymize information from actions run and share that information with Appfire to guide product improvements. This helps us better understand usage patterns and decide on future improvements and features. These features are related but are independently controlled. Action logging is off by default and anonymous analytics sharing is on by default.

Action Logging

When action logging is turned on for the installation, actions are logged into a daily log file (naming pattern: action-YYYY-MM-DD.log) in the configured logging directory. Each log entry (a line in the file) is a JSON representation of the action and related information. In the example below a runFromPageList action running modifyPage is logged:

1 2 3 4 {"serverInfo":{"baseUrl":"https:\/\/examplegear.com\/wiki","product":"Confluence","build":"b5532e6ae35f828219efdf3f57295a2415782672","buildDate":null,"version":"1000.0.0"},"exitValue":0,"actionInfo":{"server":"https:\/\/examplegear.com","common":"-a modifyPage --id @pageId@ --findReplace \"Replace this:With that\" ","action":"runFromPageList","user":"bob@appfire.com","cql":"text ~ 'Replace this'","token":"***"},"exitCode":"SUCCESS","id":"1a39045d-5215-4566-b465-31125bd457eb"} {"exitValue":0,"actionInfo":{"action":"modifyPage","findReplace":"Replace this:With that","id":"1725136908"},"exitCode":"SUCCESS","id":"47493b71-92f9-4915-8abf-b4af5f5421c5","parentId":"1a39045d-5215-4566-b465-31125bd457eb"} {"exitValue":0,"actionInfo":{"action":"modifyPage","findReplace":"Replace this:With that","id":"1725333565"},"exitCode":"SUCCESS","id":"7df29965-f6dc-4e5c-9eb6-b7b3763e19b1","parentId":"1a39045d-5215-4566-b465-31125bd457eb"} {"exitValue":0,"actionInfo":{"action":"modifyPage","findReplace":"Replace this:With that","id":"1725139230"},"exitCode":"SUCCESS","id":"f21bf479-d92b-425d-9276-454a29264405","parentId":"1a39045d-5215-4566-b465-31125bd457eb"}

Here are the first two records from the same log presented in “prettified” JSON:

runFromPageList

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 { "serverInfo": { "baseUrl": "https://examplegear.com/wiki", "product": "Confluence", "build": "b5532e6ae35f828219efdf3f57295a2415782672", "buildDate": null, "version": "1000.0.0" }, "exitValue": 0, "actionInfo": { "server": "https://examplegear.com", "common": "-a modifyPage --id @pageId@ --findReplace \"Replace this:With that\" ", "action": "runFromPageList", "user": "bob@appfire.com", "cql": "text ~ 'Replace this'", "token": "***" }, "exitCode": "SUCCESS", "id": "1a39045d-5215-4566-b465-31125bd457eb" }

modifyPage

1 2 3 4 5 6 7 8 9 10 11 { "exitValue": 0, "actionInfo": { "action": "modifyPage", "findReplace": "Replace this:With that", "id": "1725136908" }, "exitCode": "SUCCESS", "id": "47493b71-92f9-4915-8abf-b4af5f5421c5", "parentId": "1a39045d-5215-4566-b465-31125bd457eb" }

Note that each log record has an “id” property (not to be confused with the page “id” logged in the modifyPage record). In the case of actions run as part of a run action the id of the run action is stored in the “parentId” property.

Anonymous analytics

Anonymous analytics uses the same logging information but strips the records of any identifying information. Below is how the two records above are transmitted after being anonymized:

runFromPageList

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 { "serverInfo": { "baseUrl": "", "product": "Confluence", "build": "b5532e6ae35f828219efdf3f57295a2415782672", "buildDate": null, "version": "1000.0.0" }, "exitValue": 0, "actionInfo": { "server": "", "common": "", "action": "runFromPageList", "user": "", "cql": "", "token": "" }, "exitCode": "SUCCESS", "id": "1a39045d-5215-4566-b465-31125bd457eb" }

modifyPage

1 2 3 4 5 6 7 8 9 10 11 { "exitValue": 0, "actionInfo": { "action": "modifyPage", "findReplace": "", "id": "" }, "exitCode": "SUCCESS", "id": "47493b71-92f9-4915-8abf-b4af5f5421c5", "parentId": "1a39045d-5215-4566-b465-31125bd457eb" }

For the purpose of planning future product features and enhancements; these anonymized analytics help us understand how the ACLI is used without telling us anything about who, what, or where the ACLI is being used. This helps us learn and plan for future releases while ensuring user privacy. See below on how to turn off anonymous analytics.

Configuring logging and anonymous analytics

Both of these features are controlled on a per-installation basis with the configuration determined by the acli-service.properties file located in the installation directory. The configuration controls a background process that implements the support for these features and other planned features. A background process is used to minimize performance impact to normal action running. The CLI manages the background process automatically including starting it if needed as determined by the configuration. Here is an example of the service properties automatically created when an installer is used to create an installation. If the acli-service.properties file is missing, defaults will be used. Users installing directly using one of the distribution zip files may want to create the acli-service.properties file to turn off sharing analytics or to configure other aspects of our self managed service.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 # ACLI service configuration - service is automatically started only if at least one service is requested port = 7789 # Logging directory - either absolute path or a relative path in installation directory loggingDirectory = logs # Log actions only if true actionLogging = false # Unique identifier for this installation installationId = 11991b6b-f512-45c6-7fc3-6bdbb2b622d1 # Level for service logging - like debug, info, warn, error serviceLogLevel = info

Action logging will not be done by default and analytic data will be shared by default. To stop sharing analytic data with Appfire, add the following to your acli-service.properties configuration:

1 shareAnalytics = false

ACLI Service Information

The CLI self-managed service runs in the background and is a lightweight web server running on the local host using the configured port that defaults to port 7789. The loggingDirectory defaults to logs in the installation directory and is the location that contains action logs (when action logging is enabled) and managed service logs.