Skip to content

Commit 1d4eca3

Browse files
#RI-5256 - fix telemetry events
1 parent ab57d9e commit 1d4eca3

File tree

10 files changed

+24
-24
lines changed

10 files changed

+24
-24
lines changed

redisinsight/ui/src/components/database-side-panels/panels/live-time-recommendations/LiveTimeRecommendations.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ describe('LiveTimeRecommendations', () => {
127127

128128
expect(pushMock).toHaveBeenCalledWith(Pages.databaseAnalysis('instanceId'))
129129
expect(sendEventTelemetry).toBeCalledWith({
130-
event: TelemetryEvent.INSIGHTS_TIP_DATABASE_ANALYSIS_CLICKED,
130+
event: TelemetryEvent.INSIGHTS_TIPS_DATABASE_ANALYSIS_CLICKED,
131131
eventData: {
132132
databaseId: 'instanceId',
133133
total: 1,
@@ -151,7 +151,7 @@ describe('LiveTimeRecommendations', () => {
151151
fireEvent.click(queryByTestId('checkbox-show-hidden')!)
152152

153153
expect(sendEventTelemetry).toBeCalledWith({
154-
event: TelemetryEvent.INSIGHTS_TIP_SHOW_HIDDEN,
154+
event: TelemetryEvent.INSIGHTS_TIPS_SHOW_HIDDEN,
155155
eventData: {
156156
databaseId: 'instanceId',
157157
list: RECOMMENDATIONS_DATA_MOCK.recommendations?.map(({ name }) =>

redisinsight/ui/src/components/database-side-panels/panels/live-time-recommendations/LiveTimeRecommendations.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const LiveTimeRecommendations = () => {
6767
dispatch(createNewAnalysis(connectedInstanceId, delimiter))
6868
history.push(Pages.databaseAnalysis(connectedInstanceId))
6969
sendEventTelemetry({
70-
event: TelemetryEvent.INSIGHTS_TIP_DATABASE_ANALYSIS_CLICKED,
70+
event: TelemetryEvent.INSIGHTS_TIPS_DATABASE_ANALYSIS_CLICKED,
7171
eventData: {
7272
databaseId: connectedInstanceId,
7373
total: recommendations?.length,
@@ -81,7 +81,7 @@ const LiveTimeRecommendations = () => {
8181
dispatch(setRecommendationsShowHidden(value))
8282

8383
sendEventTelemetry({
84-
event: TelemetryEvent.INSIGHTS_TIP_SHOW_HIDDEN,
84+
event: TelemetryEvent.INSIGHTS_TIPS_SHOW_HIDDEN,
8585
eventData: {
8686
action: !value ? 'hide' : 'show',
8787
...getTelemetryData(recommendations)

redisinsight/ui/src/components/database-side-panels/panels/live-time-recommendations/components/recommendation/Recommendation.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe('Recommendation', () => {
8484

8585
expect(pushMock).toHaveBeenCalledWith(Pages.workbench(INSTANCE_ID_MOCK))
8686
expect(sendEventTelemetry).toBeCalledWith({
87-
event: TelemetryEvent.INSIGHTS_TIP_TUTORIAL_CLICKED,
87+
event: TelemetryEvent.INSIGHTS_TIPS_TUTORIAL_CLICKED,
8888
eventData: {
8989
databaseId: INSTANCE_ID_MOCK,
9090
name: 'searchJSON',
@@ -115,7 +115,7 @@ describe('Recommendation', () => {
115115
expect(openNewWindowDatabase)
116116
.toHaveBeenCalledWith(`${Pages.workbench(INSTANCE_ID_MOCK)}?guidePath=quick-guides/working-with-hash.html`)
117117
expect(sendEventTelemetry).toBeCalledWith({
118-
event: TelemetryEvent.INSIGHTS_TIP_TUTORIAL_CLICKED,
118+
event: TelemetryEvent.INSIGHTS_TIPS_TUTORIAL_CLICKED,
119119
eventData: {
120120
databaseId: INSTANCE_ID_MOCK,
121121
name: 'searchJSON',
@@ -147,7 +147,7 @@ describe('Recommendation', () => {
147147
expect(openNewWindowDatabase)
148148
.toHaveBeenCalledWith(`${Pages.workbench(INSTANCE_ID_MOCK)}?guidePath=/redis_stack/working_with_json.md`)
149149
expect(sendEventTelemetry).toBeCalledWith({
150-
event: TelemetryEvent.INSIGHTS_TIP_TUTORIAL_CLICKED,
150+
event: TelemetryEvent.INSIGHTS_TIPS_TUTORIAL_CLICKED,
151151
eventData: {
152152
databaseId: INSTANCE_ID_MOCK,
153153
name: 'searchJSON',

redisinsight/ui/src/components/database-side-panels/panels/live-time-recommendations/components/recommendation/Recommendation.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const Recommendation = ({
6969

7070
const handleRedirect = () => {
7171
sendEventTelemetry({
72-
event: TelemetryEvent.INSIGHTS_TIP_TUTORIAL_CLICKED,
72+
event: TelemetryEvent.INSIGHTS_TIPS_TUTORIAL_CLICKED,
7373
eventData: {
7474
databaseId: instanceId,
7575
name: recommendationsContent[name].telemetryEvent || name,
@@ -95,7 +95,7 @@ const Recommendation = ({
9595
id,
9696
{ hide: !hide },
9797
({ hide, name }) => sendEventTelemetry({
98-
event: TelemetryEvent.INSIGHTS_TIP_HIDE,
98+
event: TelemetryEvent.INSIGHTS_TIPS_HIDE,
9999
eventData: {
100100
databaseId: instanceId,
101101
action: hide ? 'hide' : 'show',
@@ -120,7 +120,7 @@ const Recommendation = ({
120120

121121
const onSuccessActionDelete = () => {
122122
sendEventTelemetry({
123-
event: TelemetryEvent.INSIGHTS_TIP_SNOOZED,
123+
event: TelemetryEvent.INSIGHTS_TIPS_SNOOZED,
124124
eventData: {
125125
databaseId: instanceId,
126126
name: recommendationsContent[name]?.telemetryEvent ?? name,
@@ -131,7 +131,7 @@ const Recommendation = ({
131131

132132
const onRecommendationLinkClick = () => {
133133
sendEventTelemetry({
134-
event: TelemetryEvent.INSIGHTS_TIP_LINK_CLICKED,
134+
event: TelemetryEvent.INSIGHTS_TIPS_LINK_CLICKED,
135135
eventData: {
136136
databaseId: instanceId,
137137
name: recommendationsContent[name]?.telemetryEvent ?? name,

redisinsight/ui/src/components/database-side-panels/panels/live-time-recommendations/components/welcome-screen/WelcomeScreen.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ describe('WelcomeScreen', () => {
9292
fireEvent.click(screen.getByTestId('approve-insights-db-analysis-btn'))
9393

9494
expect(sendEventTelemetry).toBeCalledWith({
95-
event: TelemetryEvent.INSIGHTS_TIP_DATABASE_ANALYSIS_CLICKED,
95+
event: TelemetryEvent.INSIGHTS_TIPS_DATABASE_ANALYSIS_CLICKED,
9696
eventData: {
9797
databaseId: 'instanceId',
9898
total: 1,

redisinsight/ui/src/components/database-side-panels/panels/live-time-recommendations/components/welcome-screen/WelcomeScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const NoRecommendationsScreen = () => {
3131
dispatch(createNewAnalysis(instanceId, delimiter))
3232
history.push(Pages.databaseAnalysis(instanceId))
3333
sendEventTelemetry({
34-
event: TelemetryEvent.INSIGHTS_TIP_DATABASE_ANALYSIS_CLICKED,
34+
event: TelemetryEvent.INSIGHTS_TIPS_DATABASE_ANALYSIS_CLICKED,
3535
eventData: {
3636
databaseId: instanceId,
3737
total: recommendations?.length,

redisinsight/ui/src/components/recommendation-copy-component/RecommendationCopyComponent.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('RecommendationCopyComponent', () => {
3838
})
3939

4040
expect(sendEventTelemetry).toBeCalledWith({
41-
event: TelemetryEvent.INSIGHTS_TIP_KEY_COPIED,
41+
event: TelemetryEvent.INSIGHTS_TIPS_KEY_COPIED,
4242
eventData: {
4343
databaseId: INSTANCE_ID_MOCK,
4444
name: mockTelemetryEvent,

redisinsight/ui/src/components/recommendation-copy-component/RecommendationCopyComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const RecommendationCopyComponent = ({ live = false, keyName, telemetryEvent, pr
2323
const handleCopy = () => {
2424
sendEventTelemetry({
2525
event: live
26-
? TelemetryEvent.INSIGHTS_TIP_KEY_COPIED
26+
? TelemetryEvent.INSIGHTS_TIPS_KEY_COPIED
2727
: TelemetryEvent.DATABASE_TIPS_KEY_COPIED,
2828
eventData: {
2929
databaseId: instanceId,

redisinsight/ui/src/components/recommendation-voting/components/vote-option/VoteOption.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const VoteOption = (props: Props) => {
5555
const onSuccessVoted = ({ vote, name }: { name: string, vote: Nullable<Vote> }) => {
5656
sendEventTelemetry({
5757
event: live
58-
? TelemetryEvent.INSIGHTS_TIP_VOTED
58+
? TelemetryEvent.INSIGHTS_TIPS_VOTED
5959
: TelemetryEvent.DATABASE_ANALYSIS_TIPS_VOTED,
6060
eventData: {
6161
databaseId: instanceId,

redisinsight/ui/src/telemetry/events.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,14 @@ export enum TelemetryEvent {
240240
INSIGHTS_PANEL_CLOSED = 'INSIGHTS_PANEL_CLOSED',
241241
INSIGHTS_PANEL_TAB_CHANGED = 'INSIGHTS_PANEL_TAB_CHANGED',
242242
INSIGHTS_PANEL_FULL_SCREEN_CLICKED = 'INSIGHTS_PANEL_FULL_SCREEN_CLICKED',
243-
INSIGHTS_TIP_TUTORIAL_CLICKED = 'INSIGHTS_TIP_TUTORIAL_CLICKED',
244-
INSIGHTS_TIP_VOTED = 'INSIGHTS_TIP_VOTED',
245-
INSIGHTS_TIP_SNOOZED = 'INSIGHTS_TIP_SNOOZED',
246-
INSIGHTS_TIP_HIDE = 'INSIGHTS_TIP_HIDE',
247-
INSIGHTS_TIP_SHOW_HIDDEN = 'INSIGHTS_TIP_SHOW_HIDDEN',
248-
INSIGHTS_TIP_DATABASE_ANALYSIS_CLICKED = 'INSIGHTS_TIP_DATABASE_ANALYSIS_CLICKED',
249-
INSIGHTS_TIP_KEY_COPIED = 'INSIGHTS_TIP_KEY_COPIED',
250-
INSIGHTS_TIP_LINK_CLICKED = 'INSIGHTS_TIP_LINK_CLICKED',
243+
INSIGHTS_TIPS_TUTORIAL_CLICKED = 'INSIGHTS_TIPS_TUTORIAL_CLICKED',
244+
INSIGHTS_TIPS_VOTED = 'INSIGHTS_TIPS_VOTED',
245+
INSIGHTS_TIPS_SNOOZED = 'INSIGHTS_TIPS_SNOOZED',
246+
INSIGHTS_TIPS_HIDE = 'INSIGHTS_TIPS_HIDE',
247+
INSIGHTS_TIPS_SHOW_HIDDEN = 'INSIGHTS_TIPS_SHOW_HIDDEN',
248+
INSIGHTS_TIPS_DATABASE_ANALYSIS_CLICKED = 'INSIGHTS_TIPS_DATABASE_ANALYSIS_CLICKED',
249+
INSIGHTS_TIPS_KEY_COPIED = 'INSIGHTS_TIPS_KEY_COPIED',
250+
INSIGHTS_TIPS_LINK_CLICKED = 'INSIGHTS_TIPS_LINK_CLICKED',
251251

252252
EXPLORE_PANEL_COMMAND_COPIED = 'EXPLORE_PANEL_COMMAND_COPIED',
253253
EXPLORE_PANEL_COMMAND_RUN_CLICKED = 'EXPLORE_PANEL_COMMAND_RUN_CLICKED',

0 commit comments

Comments
 (0)