mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 15:28:58 +00:00
Add telemetry output at backend container start
This commit is contained in:
@@ -1,15 +1,19 @@
|
|||||||
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'
|
// case: enable opt-out telemetry in production
|
||||||
&& TELEMETRY_ENABLED
|
postHogClient = new PostHog(POSTHOG_PROJECT_API_KEY, {
|
||||||
) {
|
host: POSTHOG_HOST
|
||||||
// case: enable opt-out telemetry in production
|
});
|
||||||
postHogClient = new PostHog(POSTHOG_PROJECT_API_KEY, {
|
|
||||||
host: POSTHOG_HOST
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default postHogClient;
|
export default postHogClient;
|
||||||
Reference in New Issue
Block a user