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
cd8c04cd
Commit
cd8c04cd
authored
Jan 24, 2020
by
Sean Arnold
Committed by
Nick Thomas
Jan 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add external_base_url, tags, gitlab_issue to detailed error
- Refresh docs
parent
a2580ca6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
197 additions
and
23 deletions
+197
-23
app/graphql/types/error_tracking/sentry_detailed_error_type.rb
...raphql/types/error_tracking/sentry_detailed_error_type.rb
+33
-23
app/graphql/types/error_tracking/sentry_error_tags_type.rb
app/graphql/types/error_tracking/sentry_error_tags_type.rb
+19
-0
changelogs/unreleased/194164-add-missing-detailed-sentry-error-graphql.yml
...ased/194164-add-missing-detailed-sentry-error-graphql.yml
+5
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+30
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+91
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+12
-0
spec/graphql/types/error_tracking/sentry_detailed_error_type_spec.rb
...l/types/error_tracking/sentry_detailed_error_type_spec.rb
+3
-0
spec/requests/api/graphql/project/error_tracking/sentry_detailed_error_request_spec.rb
...ject/error_tracking/sentry_detailed_error_request_spec.rb
+4
-0
No files found.
app/graphql/types/error_tracking/sentry_detailed_error_type.rb
View file @
cd8c04cd
...
...
@@ -11,77 +11,87 @@ module Types
field
:id
,
GraphQL
::
ID_TYPE
,
null:
false
,
description:
"ID (global ID) of the error"
description:
'ID (global ID) of the error'
field
:sentry_id
,
GraphQL
::
STRING_TYPE
,
method: :id
,
null:
false
,
description:
"ID (Sentry ID) of the error"
description:
'ID (Sentry ID) of the error'
field
:title
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
"Title of the error"
description:
'Title of the error'
field
:type
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
"Type of the error"
description:
'Type of the error'
field
:user_count
,
GraphQL
::
INT_TYPE
,
null:
false
,
description:
"Count of users affected by the error"
description:
'Count of users affected by the error'
field
:count
,
GraphQL
::
INT_TYPE
,
null:
false
,
description:
"Count of occurrences"
description:
'Count of occurrences'
field
:first_seen
,
Types
::
TimeType
,
null:
false
,
description:
"Timestamp when the error was first seen"
description:
'Timestamp when the error was first seen'
field
:last_seen
,
Types
::
TimeType
,
null:
false
,
description:
"Timestamp when the error was last seen"
description:
'Timestamp when the error was last seen'
field
:message
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
"Sentry metadata message of the error"
description:
'Sentry metadata message of the error'
field
:culprit
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
"Culprit of the error"
description:
'Culprit of the error'
field
:external_base_url
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'External Base URL of the Sentry Instance'
field
:external_url
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
"External URL of the error"
description:
'External URL of the error'
field
:sentry_project_id
,
GraphQL
::
ID_TYPE
,
method: :project_id
,
null:
false
,
description:
"ID of the project (Sentry project)"
description:
'ID of the project (Sentry project)'
field
:sentry_project_name
,
GraphQL
::
STRING_TYPE
,
method: :project_name
,
null:
false
,
description:
"Name of the project affected by the error"
description:
'Name of the project affected by the error'
field
:sentry_project_slug
,
GraphQL
::
STRING_TYPE
,
method: :project_slug
,
null:
false
,
description:
"Slug of the project affected by the error"
description:
'Slug of the project affected by the error'
field
:short_id
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
"Short ID (Sentry ID) of the error"
description:
'Short ID (Sentry ID) of the error'
field
:status
,
Types
::
ErrorTracking
::
SentryErrorStatusEnum
,
null:
false
,
description:
"Status of the error"
description:
'Status of the error'
field
:frequency
,
[
Types
::
ErrorTracking
::
SentryErrorFrequencyType
],
null:
false
,
description:
"Last 24hr stats of the error"
description:
'Last 24hr stats of the error'
field
:first_release_last_commit
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
"Commit the error was first seen"
description:
'Commit the error was first seen'
field
:last_release_last_commit
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
"Commit the error was last seen"
description:
'Commit the error was last seen'
field
:first_release_short_version
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
"Release version the error was first seen"
description:
'Release version the error was first seen'
field
:last_release_short_version
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
"Release version the error was last seen"
description:
'Release version the error was last seen'
field
:gitlab_commit
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
"GitLab commit SHA attributed to the Error based on the release version"
description:
'GitLab commit SHA attributed to the Error based on the release version'
field
:gitlab_commit_path
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
"Path to the GitLab page for the GitLab commit attributed to the error"
description:
'Path to the GitLab page for the GitLab commit attributed to the error'
field
:gitlab_issue_path
,
GraphQL
::
STRING_TYPE
,
method: :gitlab_issue
,
null:
true
,
description:
'URL of GitLab Issue'
field
:tags
,
Types
::
ErrorTracking
::
SentryErrorTagsType
,
null:
false
,
description:
'Tags associated with the Sentry Error'
def
first_seen
DateTime
.
parse
(
object
.
first_seen
)
...
...
app/graphql/types/error_tracking/sentry_error_tags_type.rb
0 → 100644
View file @
cd8c04cd
# frozen_string_literal: true
module
Types
module
ErrorTracking
# rubocop: disable Graphql/AuthorizeTypes
class
SentryErrorTagsType
<
::
Types
::
BaseObject
graphql_name
'SentryErrorTags'
description
'State of a Sentry error'
field
:level
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
"Severity level of the Sentry Error"
field
:logger
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
"Logger of the Sentry Error"
end
# rubocop: enable Graphql/AuthorizeTypes
end
end
changelogs/unreleased/194164-add-missing-detailed-sentry-error-graphql.yml
0 → 100644
View file @
cd8c04cd
---
title
:
Add tags, external_base_url, gitlab_issue to Sentry Detailed Error graphql
merge_request
:
23483
author
:
type
:
added
doc/api/graphql/reference/gitlab_schema.graphql
View file @
cd8c04cd
...
...
@@ -6065,6 +6065,11 @@ type SentryDetailedError {
"""
culprit
:
String
!
"""
External
Base
URL
of
the
Sentry
Instance
"""
externalBaseUrl
:
String
!
"""
External
URL
of
the
error
"""
...
...
@@ -6100,6 +6105,11 @@ type SentryDetailedError {
"""
gitlabCommitPath
:
String
"""
URL
of
GitLab
Issue
"""
gitlabIssuePath
:
String
"""
ID
(
global
ID
)
of
the
error
"""
...
...
@@ -6155,6 +6165,11 @@ type SentryDetailedError {
"""
status
:
SentryErrorStatus
!
"""
Tags
associated
with
the
Sentry
Error
"""
tags
:
SentryErrorTags
!
"""
Title
of
the
error
"""
...
...
@@ -6208,6 +6223,21 @@ enum SentryErrorStatus {
UNRESOLVED
}
"""
State of a Sentry error
"""
type
SentryErrorTags
{
"""
Severity
level
of
the
Sentry
Error
"""
level
:
String
"""
Logger
of
the
Sentry
Error
"""
logger
:
String
}
"""
Represents a snippet entry
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
cd8c04cd
...
...
@@ -16746,6 +16746,24 @@
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"externalBaseUrl"
,
"description"
:
"External Base URL of the Sentry Instance"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"NON_NULL"
,
"name"
:
null
,
"ofType"
:
{
"kind"
:
"SCALAR"
,
"name"
:
"String"
,
"ofType"
:
null
}
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"externalUrl"
,
"description"
:
"External URL of the error"
,
...
...
@@ -16864,6 +16882,20 @@
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"gitlabIssuePath"
,
"description"
:
"URL of GitLab Issue"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"SCALAR"
,
"name"
:
"String"
,
"ofType"
:
null
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"id"
,
"description"
:
"ID (global ID) of the error"
,
...
...
@@ -17050,6 +17082,24 @@
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"tags"
,
"description"
:
"Tags associated with the Sentry Error"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"NON_NULL"
,
"name"
:
null
,
"ofType"
:
{
"kind"
:
"OBJECT"
,
"name"
:
"SentryErrorTags"
,
"ofType"
:
null
}
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"title"
,
"description"
:
"Title of the error"
,
...
...
@@ -17196,6 +17246,47 @@
"enumValues"
:
null
,
"possibleTypes"
:
null
},
{
"kind"
:
"OBJECT"
,
"name"
:
"SentryErrorTags"
,
"description"
:
"State of a Sentry error"
,
"fields"
:
[
{
"name"
:
"level"
,
"description"
:
"Severity level of the Sentry Error"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"SCALAR"
,
"name"
:
"String"
,
"ofType"
:
null
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"logger"
,
"description"
:
"Logger of the Sentry Error"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"SCALAR"
,
"name"
:
"String"
,
"ofType"
:
null
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
}
],
"inputFields"
:
null
,
"interfaces"
:
[
],
"enumValues"
:
null
,
"possibleTypes"
:
null
},
{
"kind"
:
"OBJECT"
,
"name"
:
"GrafanaIntegration"
,
...
...
doc/api/graphql/reference/index.md
View file @
cd8c04cd
...
...
@@ -923,6 +923,7 @@ Autogenerated return type of RemoveAwardEmoji
| --- | ---- | ---------- |
|
`count`
| Int! | Count of occurrences |
|
`culprit`
| String! | Culprit of the error |
|
`externalBaseUrl`
| String! | External Base URL of the Sentry Instance |
|
`externalUrl`
| String! | External URL of the error |
|
`firstReleaseLastCommit`
| String | Commit the error was first seen |
|
`firstReleaseShortVersion`
| String | Release version the error was first seen |
...
...
@@ -930,6 +931,7 @@ Autogenerated return type of RemoveAwardEmoji
|
`frequency`
| SentryErrorFrequency! => Array | Last 24hr stats of the error |
|
`gitlabCommit`
| String | GitLab commit SHA attributed to the Error based on the release version |
|
`gitlabCommitPath`
| String | Path to the GitLab page for the GitLab commit attributed to the error |
|
`gitlabIssuePath`
| String | URL of GitLab Issue |
|
`id`
| ID! | ID (global ID) of the error |
|
`lastReleaseLastCommit`
| String | Commit the error was last seen |
|
`lastReleaseShortVersion`
| String | Release version the error was last seen |
...
...
@@ -941,6 +943,7 @@ Autogenerated return type of RemoveAwardEmoji
|
`sentryProjectSlug`
| String! | Slug of the project affected by the error |
|
`shortId`
| String! | Short ID (Sentry ID) of the error |
|
`status`
| SentryErrorStatus! | Status of the error |
|
`tags`
| SentryErrorTags! | Tags associated with the Sentry Error |
|
`title`
| String! | Title of the error |
|
`type`
| String! | Type of the error |
|
`userCount`
| Int! | Count of users affected by the error |
...
...
@@ -952,6 +955,15 @@ Autogenerated return type of RemoveAwardEmoji
|
`count`
| Int! | Count of errors received since the previously recorded time |
|
`time`
| Time! | Time the error frequency stats were recorded |
## SentryErrorTags
State of a Sentry error
| Name | Type | Description |
| --- | ---- | ---------- |
|
`level`
| String | Severity level of the Sentry Error |
|
`logger`
| String | Logger of the Sentry Error |
## Snippet
Represents a snippet entry
...
...
spec/graphql/types/error_tracking/sentry_detailed_error_type_spec.rb
View file @
cd8c04cd
...
...
@@ -20,6 +20,7 @@ describe GitlabSchema.types['SentryDetailedError'] do
message
culprit
externalUrl
externalBaseUrl
sentryProjectId
sentryProjectName
sentryProjectSlug
...
...
@@ -30,8 +31,10 @@ describe GitlabSchema.types['SentryDetailedError'] do
lastReleaseLastCommit
firstReleaseShortVersion
lastReleaseShortVersion
gitlabIssuePath
gitlabCommit
gitlabCommitPath
tags
]
is_expected
.
to
have_graphql_fields
(
*
expected_fields
)
...
...
spec/requests/api/graphql/project/error_tracking/sentry_detailed_error_request_spec.rb
View file @
cd8c04cd
...
...
@@ -57,6 +57,10 @@ describe 'getting a detailed sentry error' do
expect
(
error_data
[
'firstSeen'
]).
to
eql
sentry_detailed_error
.
first_seen
expect
(
error_data
[
'lastSeen'
]).
to
eql
sentry_detailed_error
.
last_seen
expect
(
error_data
[
'gitlabCommit'
]).
to
be
nil
expect
(
error_data
[
'externalBaseUrl'
]).
to
eq
sentry_detailed_error
.
external_base_url
expect
(
error_data
[
'gitlabIssuePath'
]).
to
eq
sentry_detailed_error
.
gitlab_issue
expect
(
error_data
[
'tags'
][
'logger'
]).
to
eq
sentry_detailed_error
.
tags
[
:logger
]
expect
(
error_data
[
'tags'
][
'level'
]).
to
eq
sentry_detailed_error
.
tags
[
:level
]
end
it
'is expected to return the frequency correctly'
do
...
...
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