mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add optional telemetry to grist-core
Summary: Adds support for optional telemetry to grist-core. A new environment variable, GRIST_TELEMETRY_LEVEL, controls the level of telemetry collected. Test Plan: Server and unit tests. Reviewers: paulfitz Reviewed By: paulfitz Subscribers: dsagal, anaisconce Differential Revision: https://phab.getgrist.com/D3880
This commit is contained in:
@@ -164,12 +164,14 @@ export class Document extends Resource {
|
||||
const percentComplete = lastSlideIndex !== undefined && numSlides !== undefined
|
||||
? Math.floor((lastSlideIndex / numSlides) * 100)
|
||||
: undefined;
|
||||
dbManager?.emit('tutorialProgressChange', {
|
||||
tutorialForkIdDigest: hashId(this.id),
|
||||
tutorialTrunkIdDigest: this.trunkId ? hashId(this.trunkId) : undefined,
|
||||
lastSlideIndex,
|
||||
numSlides,
|
||||
percentComplete,
|
||||
dbManager?.emit('tutorialProgressChanged', {
|
||||
full: {
|
||||
tutorialForkIdDigest: hashId(this.id),
|
||||
tutorialTrunkIdDigest: this.trunkId ? hashId(this.trunkId) : undefined,
|
||||
lastSlideIndex,
|
||||
numSlides,
|
||||
percentComplete,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user