Fix bugs and telemetry (#5832)
Bugfix 1: <img width="491" alt="Screenshot 2024-06-12 at 07 19 42" src="https://github.com/twentyhq/twenty/assets/6399865/e3ad2771-4edd-453d-9d85-f429177dfd15"> Bugfix 2: <img width="259" alt="Screenshot 2024-06-12 at 07 47 02" src="https://github.com/twentyhq/twenty/assets/6399865/2f82c90e-2180-4290-b12e-e72910fb108c"> Change 3: I remove the "telemetry anonymization enabled" parameter as it was misleading, we were anonymization ids but still forwarding the workspace name which is imo more sensitive than an ID
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { HttpService } from '@nestjs/axios';
|
||||
|
||||
import { anonymize } from 'src/utils/anonymize';
|
||||
import { EnvironmentService } from 'src/engine/integrations/environment/environment.service';
|
||||
|
||||
type CreateEventInput = {
|
||||
@ -30,19 +29,12 @@ export class AnalyticsService {
|
||||
return { success: true };
|
||||
}
|
||||
|
||||
const anonymizationEnabled = this.environmentService.get(
|
||||
'TELEMETRY_ANONYMIZATION_ENABLED',
|
||||
);
|
||||
|
||||
const data = {
|
||||
type: createEventInput.type,
|
||||
data: {
|
||||
hostname: hostName,
|
||||
userUUID: anonymizationEnabled && userId ? anonymize(userId) : userId,
|
||||
workspaceUUID:
|
||||
anonymizationEnabled && workspaceId
|
||||
? anonymize(workspaceId)
|
||||
: workspaceId,
|
||||
userUUID: userId,
|
||||
workspaceUUID: workspaceId,
|
||||
workspaceDisplayName: workspaceDisplayName,
|
||||
workspaceDomainName: workspaceDomainName,
|
||||
...createEventInput.data,
|
||||
|
||||
@ -21,9 +21,6 @@ class AuthProviders {
|
||||
class Telemetry {
|
||||
@Field(() => Boolean)
|
||||
enabled: boolean;
|
||||
|
||||
@Field(() => Boolean)
|
||||
anonymizationEnabled: boolean;
|
||||
}
|
||||
|
||||
@ObjectType()
|
||||
|
||||
@ -19,9 +19,6 @@ export class ClientConfigResolver {
|
||||
},
|
||||
telemetry: {
|
||||
enabled: this.environmentService.get('TELEMETRY_ENABLED'),
|
||||
anonymizationEnabled: this.environmentService.get(
|
||||
'TELEMETRY_ANONYMIZATION_ENABLED',
|
||||
),
|
||||
},
|
||||
billing: {
|
||||
isBillingEnabled: this.environmentService.get('IS_BILLING_ENABLED'),
|
||||
|
||||
Reference in New Issue
Block a user