mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Tweak telemetry
Summary: Adjusts the level of telemetry collected from Grist SaaS. Test Plan: Tested manually. Reviewers: paulfitz Reviewed By: paulfitz Subscribers: paulfitz Differential Revision: https://phab.getgrist.com/D3899
This commit is contained in:
@@ -163,6 +163,20 @@ export function getLogMetaFromDocSession(docSession: OptDocSession) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract telemetry metadata from session.
|
||||
*/
|
||||
export function getTelemetryMetaFromDocSession(docSession: OptDocSession) {
|
||||
const client = docSession.client;
|
||||
const access = getDocSessionAccessOrNull(docSession);
|
||||
const user = getDocSessionUser(docSession);
|
||||
return {
|
||||
access,
|
||||
...(user ? {userId: user.id} : {}),
|
||||
...(client ? client.getFullTelemetryMeta() : {}), // Client if present will repeat and add to user info.
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Only offer choices of engine on experimental deployments (staging/dev).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user