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:
@@ -4,6 +4,7 @@ import {delay} from 'app/common/delay';
|
||||
import {CommClientConnect, CommMessage, CommResponse, CommResponseError} from 'app/common/CommTypes';
|
||||
import {ErrorWithCode} from 'app/common/ErrorWithCode';
|
||||
import {UserProfile} from 'app/common/LoginSessionAPI';
|
||||
import {TelemetryMetadata} from 'app/common/Telemetry';
|
||||
import {ANONYMOUS_USER_EMAIL} from 'app/common/UserAPI';
|
||||
import {User} from 'app/gen-server/entity/User';
|
||||
import {HomeDBManager} from 'app/gen-server/lib/HomeDBManager';
|
||||
@@ -433,8 +434,8 @@ export class Client {
|
||||
return meta;
|
||||
}
|
||||
|
||||
public getFullTelemetryMeta() {
|
||||
const meta: Record<string, any> = {};
|
||||
public getFullTelemetryMeta(): TelemetryMetadata {
|
||||
const meta: TelemetryMetadata = {};
|
||||
// We assume the _userId has already been cached, which will be true always (for all practical
|
||||
// purposes) because it's set when the Authorizer checks this client.
|
||||
if (this._userId) { meta.userId = this._userId; }
|
||||
|
||||
Reference in New Issue
Block a user