Skip to content

Commit 3c3dfdb

Browse files
committed
changes to telemetry
1 parent cff2f49 commit 3c3dfdb

17 files changed

+30
-12
lines changed

common/client/src/main/java/zingg/common/client/Client.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ public void printAnalyticsBanner(boolean collectMetrics) {
147147
}
148148
else {
149149
LOG.info("");
150-
LOG.info("********************************************************");
151-
LOG.info("* Zingg is not collecting any analytics data *");
152-
LOG.info("********************************************************");
150+
LOG.info("*************************************************************************************************************");
151+
LOG.info("* Zingg is not collecting any analytics data and will only log a blank event with the name of the phase *");
152+
LOG.info("*************************************************************************************************************");
153153
LOG.info("");
154154
}
155155
}

common/core/src/main/java/zingg/common/core/util/Analytics.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,13 @@ public static void postEvent(String phase, boolean collectMetrics) {
9393
paramNode.put(entry.getKey(), entry.getValue());
9494
}
9595
eventNode.set("params", paramNode);
96-
97-
ArrayNode eventList;
98-
eventList = mapper.createArrayNode();
99-
eventList.add(eventNode);
100-
rootNode.set("events", eventList);
10196
}
97+
98+
ArrayNode eventList;
99+
eventList = mapper.createArrayNode();
100+
eventList.add(eventNode);
101+
rootNode.set("events", eventList);
102+
rootNode.put("user_id", getDomain());
102103

103104
String metricEvent = rootNode.toString();
104105
LOG.warn("event is " + metricEvent);

docs/security.md

+21-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,28 @@ However, Zingg does collect usage metrics and writes them to Google Analytics. T
1111

1212
The following details are captured:
1313

14-
* **Data source type:** type of data format e.g. CSV, snowflake
14+
* **Data source type:** data format e.g. CSV, snowflake, parquet
1515
* **Fields count:** number of fields used for training
16-
* **Total Data count:** for match phase, number of total records
16+
* **Record Count:** total number of total records pasing through Zingg
1717
* **Execution Time:** execution time of the program
18-
* **Matched and Nonmatched records count:** for the train phase, the number of matched and nonmatched records
18+
* **Matches and Nonmatches:** the number of matched and nonmatched records
19+
* **Domain:** helps Zingg developers to understand our user enterprises
20+
* **JDK information:** version, flavour
21+
* **OS information:** operating system type
22+
* **Databricks Environment:**
1923

20-
If you do not wish to send this data, please set collectMetrics flag to false in the configuration JSON while running Zingg.
24+
An example analytics event while running Zingg is
25+
```
26+
{"client_id":"sonal-mac.local","events":[{"name":"findTrainingData","params":{"numMatchFields":"10.0","numTotalFields":"11.0","modelId":"100","java.version":"1.8.0_342-internal","dataFormat":"csv","os.arch":"x86_64","java.home":"/Library/Java/JavaVirtualMachines/openlogic-openjdk-8.jdk/Contents/Home/jre","executionTime":"93.0","zingg_version":"0.4.0","domain":"sonal-mac.local","os.name":"Mac OS X","DB_INSTANCE_TYPE":null,"DATABRICKS_RUNTIME_VERSION":null,"outputFormat":"csv"}}]}
27+
```
28+
29+
To view the information captured while running Zingg, edit log4j2.properties and turn loggin level of zingg_analytics to warn
30+
```
31+
logger.zingg_analytics.level = warn
32+
```
33+
34+
If you do not wish to send the data, please set collectMetrics flag to false in the configuration JSON while running Zingg. A blank event will be logged in this case
35+
```
36+
{"client_id":"sonal-mac.local","events":[{"name":"findTrainingData"}],"user_id":"sonal-mac.local"}
37+
```
2138

8 Bytes
Binary file not shown.

models/tmp/trainingData/unmarked/_SUCCESS

Whitespace-only changes.

0 commit comments

Comments
 (0)