refactor(core): Remove unused telemetry payload (no-changelog) (#10158)

This commit is contained in:
Iván Ovejero 2024-07-23 16:42:25 +02:00 committed by GitHub
parent 3846eb967a
commit e46341ac46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 12 deletions

View file

@ -71,7 +71,7 @@ export class VariablesService {
} }
this.validateVariable(variable); this.validateVariable(variable);
this.eventService.emit('variable-created', { variableType: variable.type }); this.eventService.emit('variable-created');
const saveResult = await this.variablesRepository.save( const saveResult = await this.variablesRepository.save(
{ {
...variable, ...variable,

View file

@ -4,7 +4,7 @@ import type { Event } from './event.types';
@Service() @Service()
export class EventService extends EventEmitter { export class EventService extends EventEmitter {
emit<K extends keyof Event>(eventName: K, arg: Event[K]) { emit<K extends keyof Event>(eventName: K, arg?: Event[K]) {
super.emit(eventName, arg); super.emit(eventName, arg);
return true; return true;
} }

View file

@ -256,9 +256,7 @@ export type Event = {
success: boolean; success: boolean;
}; };
'variable-created': { 'variable-created': {};
variableType: string;
};
'external-secrets-provider-settings-saved': { 'external-secrets-provider-settings-saved': {
userId?: string; userId?: string;

View file

@ -44,9 +44,7 @@ export class TelemetryEventRelay {
this.eventService.on('license-renewal-attempted', (event) => { this.eventService.on('license-renewal-attempted', (event) => {
this.licenseRenewalAttempted(event); this.licenseRenewalAttempted(event);
}); });
this.eventService.on('variable-created', (event) => { this.eventService.on('variable-created', () => this.variableCreated());
this.variableCreated(event);
});
this.eventService.on('external-secrets-provider-settings-saved', (event) => { this.eventService.on('external-secrets-provider-settings-saved', (event) => {
this.externalSecretsProviderSettingsSaved(event); this.externalSecretsProviderSettingsSaved(event);
}); });
@ -187,10 +185,8 @@ export class TelemetryEventRelay {
}); });
} }
private variableCreated({ variableType }: Event['variable-created']) { private variableCreated() {
void this.telemetry.track('User created variable', { void this.telemetry.track('User created variable');
variable_type: variableType,
});
} }
private externalSecretsProviderSettingsSaved({ private externalSecretsProviderSettingsSaved({