Skip to content

Commit 2794542

Browse files
authored
feat: change 'logs' to 'issues' (#181)
1 parent 1afffea commit 2794542

File tree

5 files changed

+31
-31
lines changed

5 files changed

+31
-31
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
Sentry facilitates the debugging process by helping developers track, organize, and break down errors more efficiently. At Sourcegraph, we want to make it more convenient for developers to access Sentry's error tracking tools directly from the code that is doing the error handling. For example: `throw new Error(QUERY)`, `console.log(QUERY)`, and `console.error(QUERY)`.
77

8-
The Sentry extension renders `View logs in Sentry` next to error throwing statements, and links directly to the corresponding Sentry issues stream page. Links are rendered when viewing files on [Sourcegraph](https://sourcegraph.com), GitHub, and GitLab.
8+
The Sentry extension renders `View issues in Sentry` next to error throwing statements, and links directly to the corresponding Sentry issues stream page. Links are rendered when viewing files on [Sourcegraph](https://sourcegraph.com), GitHub, and GitLab.
99

1010
- **Sentry: Show/hide Sentry**: toggles Sentry links decorations with each matching error handling code.
1111

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/sourcegraph/sourcegraph/master/shared/src/schema/extension.schema.json",
33
"name": "sentry",
4-
"description": "Sourcegraph Sentry extension renders \"View logs on Sentry\" links next to error handling code.",
4+
"description": "Sourcegraph Sentry extension renders \"View issues on Sentry\" links next to error handling code.",
55
"publisher": "Sourcegraph",
66
"activationEvents": [
77
"*"

src/handler.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,33 +125,33 @@ export function createDecoration(
125125
): LineDecorationText {
126126
if (missingConfigData.includes('settings') || !sentryOrg) {
127127
return {
128-
content: ' Configure the Sentry extension to view logs (❕)» ',
128+
content: ' Configure the Sentry extension to view issues (❕)» ',
129129
hover: ' Please fill out the configurations in your Sentry extension settings.',
130130
}
131131
}
132132
if (missingConfigData.includes('repositories')) {
133133
return {
134-
content: ' View logs in Sentry (❕)» ',
134+
content: ' View issues in Sentry (❕)» ',
135135
hover: ' Add this repository to your Sentry extension settings for project matching.',
136136
}
137137
}
138138
if (!sentryProjectId) {
139139
return {
140-
content: ' View logs in Sentry (❕)» ',
140+
content: ' View issues in Sentry (❕)» ',
141141
hover: ' Add Sentry projects to your Sentry extension settings for project matching.',
142142
}
143143
}
144144
if (missingConfigData.length > 0 && missingConfigData[0] !== 'settings') {
145145
return {
146-
content: ' View logs in Sentry (❕)» ',
146+
content: ' View issues in Sentry (❕)» ',
147147
hover:
148148
' Please fill out these configurations for better Sentry project matching: ' +
149149
missingConfigData.join(', '),
150150
}
151151
}
152152

153153
return {
154-
content: ' View logs in Sentry » ',
155-
hover: ' View logs in Sentry » ',
154+
content: ' View issues in Sentry » ',
155+
hover: ' View issues in Sentry » ',
156156
}
157157
}

src/test/extension.test.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ const decorateLineInput = [
9999
after: {
100100
backgroundColor: '#e03e2f',
101101
color: 'rgba(255, 255, 255, 0.8)',
102-
contentText: ' View logs in Sentry » ',
103-
hoverMessage: ' View logs in Sentry » ',
102+
contentText: ' View issues in Sentry » ',
103+
hoverMessage: ' View issues in Sentry » ',
104104
linkURL:
105105
'https://sentry.io/organizations/sourcegraph/issues/?project=134412&query=is%3Aunresolved+%22cannot+determine+file+path%22&statsPeriod=14d',
106106
},
@@ -118,7 +118,7 @@ const decorateLineInput = [
118118
after: {
119119
backgroundColor: '#f2736d',
120120
color: 'rgba(255, 255, 255, 0.8)',
121-
contentText: ' View logs in Sentry (❕)» ',
121+
contentText: ' View issues in Sentry (❕)» ',
122122
hoverMessage: ' Add this repository to your Sentry extension settings for project matching.',
123123
linkURL:
124124
'https://sentry.io/organizations/sourcegraph/issues/?project=134412&query=is%3Aunresolved+%22cannot+determine+file+path%22&statsPeriod=14d',
@@ -137,7 +137,7 @@ const decorateLineInput = [
137137
after: {
138138
backgroundColor: '#f2736d',
139139
color: 'rgba(255, 255, 255, 0.8)',
140-
contentText: ' View logs in Sentry (❕)» ',
140+
contentText: ' View issues in Sentry (❕)» ',
141141
hoverMessage: ' Add this repository to your Sentry extension settings for project matching.',
142142
linkURL:
143143
'https://sentry.io/organizations/sourcegraph/issues/?project=134412&query=is%3Aunresolved+%22cannot+determine+file+path%22&statsPeriod=14d',
@@ -156,7 +156,7 @@ const decorateLineInput = [
156156
after: {
157157
backgroundColor: '#f2736d',
158158
color: 'rgba(255, 255, 255, 0.8)',
159-
contentText: ' View logs in Sentry (❕)» ',
159+
contentText: ' View issues in Sentry (❕)» ',
160160
hoverMessage: ' Add Sentry projects to your Sentry extension settings for project matching.',
161161
linkURL: 'https://sentry.io/organizations/sourcegraph/issues/',
162162
},
@@ -175,7 +175,7 @@ const decorateLineInput = [
175175
after: {
176176
backgroundColor: '#f2736d',
177177
color: 'rgba(255, 255, 255, 0.8)',
178-
contentText: ' View logs in Sentry (❕)» ',
178+
contentText: ' View issues in Sentry (❕)» ',
179179
hoverMessage: ' Add Sentry projects to your Sentry extension settings for project matching.',
180180
linkURL: 'https://sentry.io/organizations/sourcegraph/issues/',
181181
},
@@ -217,8 +217,8 @@ const getDecorationsInput = [
217217
after: {
218218
backgroundColor: '#e03e2f',
219219
color: 'rgba(255, 255, 255, 0.8)',
220-
contentText: ' View logs in Sentry » ',
221-
hoverMessage: ' View logs in Sentry » ',
220+
contentText: ' View issues in Sentry » ',
221+
hoverMessage: ' View issues in Sentry » ',
222222
linkURL:
223223
'https://sentry.io/organizations/sourcegraph/issues/?project=1334031&query=is%3Aunresolved+%22cannot+determine+file+path%22&statsPeriod=14d',
224224
},
@@ -229,8 +229,8 @@ const getDecorationsInput = [
229229
after: {
230230
backgroundColor: '#e03e2f',
231231
color: 'rgba(255, 255, 255, 0.8)',
232-
contentText: ' View logs in Sentry » ',
233-
hoverMessage: ' View logs in Sentry » ',
232+
contentText: ' View issues in Sentry » ',
233+
hoverMessage: ' View issues in Sentry » ',
234234
linkURL:
235235
'https://sentry.io/organizations/sourcegraph/issues/?project=1334031&query=is%3Aunresolved+%22cannot+determine+delta+info%22&statsPeriod=14d',
236236
},
@@ -253,8 +253,8 @@ const getDecorationsInput = [
253253
after: {
254254
backgroundColor: '#e03e2f',
255255
color: 'rgba(255, 255, 255, 0.8)',
256-
contentText: ' View logs in Sentry » ',
257-
hoverMessage: ' View logs in Sentry » ',
256+
contentText: ' View issues in Sentry » ',
257+
hoverMessage: ' View issues in Sentry » ',
258258
linkURL:
259259
'https://sentry.io/organizations/sourcegraph/issues/?project=1334031&query=is%3Aunresolved+%22cannot+determine+file+path%22&statsPeriod=14d',
260260
},
@@ -307,8 +307,8 @@ of(codeView).pipe(
307307
after: {
308308
backgroundColor: '#e03e2f',
309309
color: 'rgba(255, 255, 255, 0.8)',
310-
contentText: ' View logs in Sentry » ',
311-
hoverMessage: ' View logs in Sentry » ',
310+
contentText: ' View issues in Sentry » ',
311+
hoverMessage: ' View issues in Sentry » ',
312312
linkURL:
313313
'https://sentry.io/organizations/sourcegraph/issues/?project=1334031&query=is%3Aunresolved+%22cannot+determine+file+path%22&statsPeriod=14d',
314314
},
@@ -347,7 +347,7 @@ const supportedLanguageCode = [
347347
after: {
348348
backgroundColor: '#f2736d',
349349
color: 'rgba(255, 255, 255, 0.8)',
350-
contentText: ' View logs in Sentry (❕)» ',
350+
contentText: ' View issues in Sentry (❕)» ',
351351
hoverMessage: ' Add Sentry projects to your Sentry extension settings for project matching.',
352352
linkURL: 'https://sentry.io/organizations/sourcegraph/issues/',
353353
},
@@ -365,7 +365,7 @@ const supportedLanguageCode = [
365365
after: {
366366
backgroundColor: '#f2736d',
367367
color: 'rgba(255, 255, 255, 0.8)',
368-
contentText: ' View logs in Sentry (❕)» ',
368+
contentText: ' View issues in Sentry (❕)» ',
369369
hoverMessage: ' Add Sentry projects to your Sentry extension settings for project matching.',
370370
linkURL: 'https://sentry.io/organizations/sourcegraph/issues/',
371371
},
@@ -382,7 +382,7 @@ const supportedLanguageCode = [
382382
after: {
383383
backgroundColor: '#f2736d',
384384
color: 'rgba(255, 255, 255, 0.8)',
385-
contentText: ' View logs in Sentry (❕)» ',
385+
contentText: ' View issues in Sentry (❕)» ',
386386
hoverMessage: ' Add Sentry projects to your Sentry extension settings for project matching.',
387387
linkURL: 'https://sentry.io/organizations/sourcegraph/issues/',
388388
},
@@ -400,7 +400,7 @@ const supportedLanguageCode = [
400400
after: {
401401
backgroundColor: '#f2736d',
402402
color: 'rgba(255, 255, 255, 0.8)',
403-
contentText: ' View logs in Sentry (❕)» ',
403+
contentText: ' View issues in Sentry (❕)» ',
404404
hoverMessage: ' Add Sentry projects to your Sentry extension settings for project matching.',
405405
linkURL: 'https://sentry.io/organizations/sourcegraph/issues/',
406406
},
@@ -419,7 +419,7 @@ const supportedLanguageCode = [
419419
after: {
420420
backgroundColor: '#f2736d',
421421
color: 'rgba(255, 255, 255, 0.8)',
422-
contentText: ' Configure the Sentry extension to view logs (❕)» ',
422+
contentText: ' Configure the Sentry extension to view issues (❕)» ',
423423
hoverMessage: ' Please fill out the configurations in your Sentry extension settings.',
424424
linkURL: 'https://sentry.io/organizations/sourcegraph/issues/',
425425
},

src/test/handler.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,31 +240,31 @@ const createDecorationInputs = [
240240
goal: 'handles an empty organization setting',
241241
params: { missingConfigData: [] },
242242
expected: {
243-
content: ' Configure the Sentry extension to view logs (❕)» ',
243+
content: ' Configure the Sentry extension to view issues (❕)» ',
244244
hover: ' Please fill out the configurations in your Sentry extension settings.',
245245
},
246246
},
247247
{
248248
goal: 'informs user to fill out settings.',
249249
params: { missingConfigData: ['settings'] },
250250
expected: {
251-
content: ' Configure the Sentry extension to view logs (❕)» ',
251+
content: ' Configure the Sentry extension to view issues (❕)» ',
252252
hover: ' Please fill out the configurations in your Sentry extension settings.',
253253
},
254254
},
255255
{
256256
goal: 'informs user to add the repository to their Sentry settings.',
257257
params: { missingConfigData: ['repositories'], sentryOrg: 'sourcegraph' },
258258
expected: {
259-
content: ' View logs in Sentry (❕)» ',
259+
content: ' View issues in Sentry (❕)» ',
260260
hover: ' Add this repository to your Sentry extension settings for project matching.',
261261
},
262262
},
263263
{
264264
goal: 'informs user to add to add missing configs to their Sentry settings.',
265265
params: { missingConfigData: ['linePatterns', 'files'], sentryProjectId: '1334031', sentryOrg: 'sourcegraph' },
266266
expected: {
267-
content: ' View logs in Sentry (❕)» ',
267+
content: ' View issues in Sentry (❕)» ',
268268
hover: ' Please fill out these configurations for better Sentry project matching: linePatterns, files',
269269
},
270270
},

0 commit comments

Comments
 (0)