mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
10f5f0cb37
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
22 lines
805 B
TypeScript
22 lines
805 B
TypeScript
import { checkMinIOExternalStorage,
|
|
configureMinIOExternalStorage } from 'app/server/lib/configureMinIOExternalStorage';
|
|
import { makeSimpleCreator } from 'app/server/lib/ICreate';
|
|
import { Telemetry } from 'app/server/lib/Telemetry';
|
|
|
|
export const create = makeSimpleCreator({
|
|
deploymentType: 'core',
|
|
// This can and should be overridden by GRIST_SESSION_SECRET
|
|
// (or generated randomly per install, like grist-omnibus does).
|
|
sessionSecret: 'Phoo2ag1jaiz6Moo2Iese2xoaphahbai3oNg7diemohlah0ohtae9iengafieS2Hae7quungoCi9iaPh',
|
|
storage: [
|
|
{
|
|
name: 'minio',
|
|
check: () => checkMinIOExternalStorage() !== undefined,
|
|
create: configureMinIOExternalStorage,
|
|
},
|
|
],
|
|
telemetry: {
|
|
create: (dbManager, gristServer) => new Telemetry(dbManager, gristServer),
|
|
}
|
|
});
|