mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 20:28:54 +00:00
Add telemetry output at backend container start
This commit is contained in:
@@ -1,11 +1,15 @@
|
|||||||
import { PostHog } from 'posthog-node';
|
import { PostHog } from 'posthog-node';
|
||||||
import { NODE_ENV, POSTHOG_HOST, POSTHOG_PROJECT_API_KEY, TELEMETRY_ENABLED } from '../config';
|
import {
|
||||||
|
NODE_ENV,
|
||||||
|
POSTHOG_HOST,
|
||||||
|
POSTHOG_PROJECT_API_KEY,
|
||||||
|
TELEMETRY_ENABLED
|
||||||
|
} from '../config';
|
||||||
|
|
||||||
|
console.log('TELEMETRY_ENABLED: ', TELEMETRY_ENABLED);
|
||||||
|
|
||||||
let postHogClient: any;
|
let postHogClient: any;
|
||||||
if (
|
if (NODE_ENV === 'production' && TELEMETRY_ENABLED) {
|
||||||
NODE_ENV === 'production'
|
|
||||||
&& TELEMETRY_ENABLED
|
|
||||||
) {
|
|
||||||
// case: enable opt-out telemetry in production
|
// case: enable opt-out telemetry in production
|
||||||
postHogClient = new PostHog(POSTHOG_PROJECT_API_KEY, {
|
postHogClient = new PostHog(POSTHOG_PROJECT_API_KEY, {
|
||||||
host: POSTHOG_HOST
|
host: POSTHOG_HOST
|
||||||
|
|||||||
Reference in New Issue
Block a user