Skip to content

Conversation

ArtyomPSofteq
Copy link
Contributor

#RI-1100 - add telemetry events for the workbench

ArtemHoruzhenko
ArtemHoruzhenko previously approved these changes Dec 2, 2021
describe('sendCliClientCreatedEvent', () => {
it('should emit CliClientCreated event', () => {
service.sendCliClientCreatedEvent(instanceId, { data: 'Some data' });
service.sendClientCreatedEvent(instanceId, 'cli', { data: 'Some data' });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use AppTool.CLI instead of string 'cli'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. done

describe('sendCliClientCreationFailedEvent', () => {
it('should emit CliClientCreationFailed event', () => {
service.sendCliClientCreationFailedEvent(instanceId, httpException, { data: 'Some data' });
service.sendClientCreationFailedEvent(instanceId, 'cli', httpException, { data: 'Some data' });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same as above

});
it('should emit CliClientCreationFailed event without additional data', () => {
service.sendCliClientCreationFailedEvent(instanceId, httpException);
service.sendClientCreationFailedEvent(instanceId, 'cli', httpException);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

describe('sendCliClientRecreatedEvent', () => {
it('should emit CliClientRecreated event', () => {
service.sendCliClientRecreatedEvent(instanceId, { data: 'Some data' });
service.sendClientRecreatedEvent(instanceId, 'cli', { data: 'Some data' });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and everywhere use constants instead of string

}
default:
return `CLI_${event}`;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no need to duplicate CLI_ prefix in the 'cli' and 'default' cases. Use default only instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ArtyomPSofteq ArtyomPSofteq merged commit 6865aba into main Dec 2, 2021
@ArtyomPSofteq ArtyomPSofteq deleted the feature/RI-1100_workbench-telemetry branch December 2, 2021 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants