Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5d35ec1d
Commit
5d35ec1d
authored
Jun 02, 2020
by
Olena Horal-Koretska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track error status update as separate actions
parent
a38eb0c4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
23 deletions
+18
-23
app/assets/javascripts/error_tracking/components/error_details.vue
...s/javascripts/error_tracking/components/error_details.vue
+2
-2
app/assets/javascripts/error_tracking/components/error_tracking_list.vue
...scripts/error_tracking/components/error_tracking_list.vue
+2
-2
app/assets/javascripts/error_tracking/utils.js
app/assets/javascripts/error_tracking/utils.js
+3
-4
changelogs/unreleased/217680-health-metric-instrumentation.yml
...elogs/unreleased/217680-health-metric-instrumentation.yml
+5
-0
spec/frontend/error_tracking/components/error_details_spec.js
.../frontend/error_tracking/components/error_details_spec.js
+4
-10
spec/frontend/error_tracking/components/error_tracking_list_spec.js
...end/error_tracking/components/error_tracking_list_spec.js
+2
-5
No files found.
app/assets/javascripts/error_tracking/components/error_details.vue
View file @
5d35ec1d
...
...
@@ -233,8 +233,8 @@ export default {
Tracking
.
event
(
category
,
action
);
},
trackStatusUpdate
(
status
)
{
const
{
category
,
action
,
label
}
=
trackErrorStatusUpdateOptions
;
Tracking
.
event
(
category
,
action
,
{
label
,
property
:
status
}
);
const
{
category
,
action
}
=
trackErrorStatusUpdateOptions
(
status
)
;
Tracking
.
event
(
category
,
action
);
},
},
};
...
...
app/assets/javascripts/error_tracking/components/error_tracking_list.vue
View file @
5d35ec1d
...
...
@@ -218,8 +218,8 @@ export default {
Tracking
.
event
(
category
,
action
);
},
trackStatusUpdate
(
status
)
{
const
{
category
,
action
,
label
}
=
trackErrorStatusUpdateOptions
;
Tracking
.
event
(
category
,
action
,
{
label
,
property
:
status
}
);
const
{
category
,
action
}
=
trackErrorStatusUpdateOptions
(
status
)
;
Tracking
.
event
(
category
,
action
);
},
},
};
...
...
app/assets/javascripts/error_tracking/utils.js
View file @
5d35ec1d
...
...
@@ -30,8 +30,7 @@ export const trackErrorDetailsViewsOptions = {
/**
* Tracks snowplow event when error status is updated
*/
export
const
trackErrorStatusUpdateOptions
=
{
export
const
trackErrorStatusUpdateOptions
=
status
=>
(
{
category
:
'
Error Tracking
'
,
action
:
'
update_error_status
'
,
label
:
'
Status
'
,
};
action
:
`update_
${
status
}
_status`
,
});
changelogs/unreleased/217680-health-metric-instrumentation.yml
0 → 100644
View file @
5d35ec1d
---
title
:
Track Sentry error status updates with dedicated actions
merge_request
:
33623
author
:
type
:
changed
spec/frontend/error_tracking/components/error_details_spec.js
View file @
5d35ec1d
...
...
@@ -519,11 +519,8 @@ describe('ErrorDetails', () => {
Tracking
.
event
.
mockClear
();
findUpdateIgnoreStatusButton
().
vm
.
$emit
(
'
click
'
);
setImmediate
(()
=>
{
const
{
category
,
action
,
label
}
=
trackErrorStatusUpdateOptions
;
expect
(
Tracking
.
event
).
toHaveBeenCalledWith
(
category
,
action
,
{
label
,
property
:
'
ignored
'
,
});
const
{
category
,
action
}
=
trackErrorStatusUpdateOptions
(
'
ignored
'
);
expect
(
Tracking
.
event
).
toHaveBeenCalledWith
(
category
,
action
);
});
});
...
...
@@ -531,11 +528,8 @@ describe('ErrorDetails', () => {
Tracking
.
event
.
mockClear
();
findUpdateResolveStatusButton
().
vm
.
$emit
(
'
click
'
);
setImmediate
(()
=>
{
const
{
category
,
action
,
label
}
=
trackErrorStatusUpdateOptions
;
expect
(
Tracking
.
event
).
toHaveBeenCalledWith
(
category
,
action
,
{
label
,
property
:
'
resolved
'
,
});
const
{
category
,
action
}
=
trackErrorStatusUpdateOptions
(
'
resolved
'
);
expect
(
Tracking
.
event
).
toHaveBeenCalledWith
(
category
,
action
);
});
});
...
...
spec/frontend/error_tracking/components/error_tracking_list_spec.js
View file @
5d35ec1d
...
...
@@ -491,11 +491,8 @@ describe('ErrorTrackingList', () => {
});
setImmediate
(()
=>
{
const
{
category
,
action
,
label
}
=
trackErrorStatusUpdateOptions
;
expect
(
Tracking
.
event
).
toHaveBeenCalledWith
(
category
,
action
,
{
label
,
property
:
status
,
});
const
{
category
,
action
}
=
trackErrorStatusUpdateOptions
(
status
);
expect
(
Tracking
.
event
).
toHaveBeenCalledWith
(
category
,
action
);
});
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment