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.eventService.emit('variable-created', { variableType: variable.type });
this.eventService.emit('variable-created');
const saveResult = await this.variablesRepository.save(
{
...variable,

View file

@ -4,7 +4,7 @@ import type { Event } from './event.types';
@Service()
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);
return true;
}

View file

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

View file

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