1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-11-27 16:16:48 +03:00

feat(server): kick off telemetry

This commit is contained in:
louistiti 2023-04-10 22:35:37 +08:00
parent 5061cac591
commit 40069ab5f0
No known key found for this signature in database
GPG Key ID: 0A1C3B043E70C77D
2 changed files with 12 additions and 2 deletions

View File

@ -31,8 +31,8 @@ LEON_HTTP_API_KEY=
# Language used for the HTTP API
LEON_HTTP_API_LANG=en-US
# Enable/disable collaborative logger
LEON_LOGGER=true
# Enable/disable telemetry
LEON_TELEMETRY=true
# Python TCP server
LEON_PY_TCP_SERVER_HOST=0.0.0.0

10
server/src/telemetry.ts Normal file
View File

@ -0,0 +1,10 @@
const IS_TELEMETRY_ENABLED = process.env['LEON_TELEMETRY'] === 'true'
const INSTANCE_ID = '' // TODO: read from file (leon.json > instanceID)
export class Telemetry {
public static send(): void {
if (IS_TELEMETRY_ENABLED) {
// TODO
}
}
}