🔥 Remove identify from BE

This commit is contained in:
Iván Ovejero 2022-09-06 12:51:26 +02:00
parent e565b87cf8
commit 9eba337d93
2 changed files with 1 additions and 34 deletions

View file

@ -48,7 +48,6 @@ export class InternalHooksClass implements IInternalHooksClass {
};
return Promise.all([
this.telemetry.identify(info),
this.telemetry.track('Instance started', {
...info,
earliest_workflow_created: earliestWorkflowCreatedAt,

View file

@ -138,38 +138,6 @@ export class Telemetry {
});
}
async identify(traits?: {
[key: string]: string | number | boolean | object | undefined | null;
}): Promise<void> {
return new Promise<void>((resolve) => {
if (this.postHog) {
this.postHog.identify({
distinctId: this.instanceId,
properties: {
...traits,
instanceId: this.instanceId,
},
});
}
if (this.rudderStack) {
this.rudderStack.identify(
{
userId: this.instanceId,
anonymousId: '000000000000',
traits: {
...traits,
instanceId: this.instanceId,
},
},
resolve,
);
} else {
resolve();
}
});
}
async track(
eventName: string,
properties: ITelemetryTrackProperties = {},
@ -208,7 +176,7 @@ export class Telemetry {
): Promise<boolean> {
if (!this.postHog) return Promise.resolve(false);
const fullId = [this.instanceId, userId].join('_'); // PostHog disallows # in ID
const fullId = [this.instanceId, userId].join('#');
return this.postHog.isFeatureEnabled(featureFlagName, fullId);
}