Skip to content

Commit 891bf0d

Browse files
committed
chore: remove sentry nd jun
1 parent 1fb2d9d commit 891bf0d

File tree

6 files changed

+26
-275
lines changed

6 files changed

+26
-275
lines changed

js/packages/quary-extension/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,6 @@
234234
},
235235
"dependencies": {
236236
"@duckdb/duckdb-wasm": "1.28.0",
237-
"@june-so/analytics-node": "^8.0.0",
238-
"@sentry/browser": "^8.27.0",
239237
"buffer": "^6.0.3",
240238
"crypto-browserify": "^3.12.0",
241239
"file-loader": "^6.2.0",

js/packages/quary-extension/src/web/authenticationProviderQuary.ts

-20
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
UriHandler,
1414
window,
1515
} from 'vscode'
16-
import type { Analytics } from '@june-so/analytics-node'
1716
import { Err, isErr, Ok, ResultE } from '@shared/result'
1817
import { ServicesLogger } from './servicesLogger'
1918

@@ -63,7 +62,6 @@ export class AuthenticationProviderQuary
6362
implements AuthenticationProvider, Disposable
6463
{
6564
private readonly logger: ServicesLogger
66-
private readonly analytics: Analytics
6765
private _sessionChangeEmitter =
6866
new EventEmitter<AuthenticationProviderAuthenticationSessionsChangeEvent>()
6967
private _disposable: Disposable
@@ -72,7 +70,6 @@ export class AuthenticationProviderQuary
7270
constructor(
7371
private readonly context: ExtensionContext,
7472
logger: ServicesLogger,
75-
analytics: Analytics,
7673
) {
7774
this._disposable = Disposable.from(
7875
authentication.registerAuthenticationProvider(
@@ -84,7 +81,6 @@ export class AuthenticationProviderQuary
8481
window.registerUriHandler(this._uriHandler),
8582
)
8683
this.logger = logger
87-
this.analytics = analytics
8884
}
8985

9086
get onDidChangeSessions() {
@@ -269,22 +265,6 @@ export class AuthenticationProviderQuary
269265
id: userInfo.sub,
270266
email: userInfo.email || '',
271267
})
272-
this.analytics.identify({
273-
userId: userInfo.sub,
274-
traits: {
275-
email: userInfo.email,
276-
name: userInfo.name,
277-
avatar: userInfo.picture,
278-
},
279-
})
280-
this.analytics.track({
281-
userId: userInfo.sub,
282-
event: 'Signed In',
283-
properties: {
284-
environment: env.appHost,
285-
},
286-
})
287-
288268
return Ok(session)
289269
} catch (error) {
290270
const errorMessage =

js/packages/quary-extension/src/web/commands.ts

-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
Ok,
1111
Result,
1212
} from '@shared/result'
13-
import type { Analytics } from '@june-so/analytics-node'
1413
import {
1514
ListAssetsRequest_AssetsToSkip,
1615
ListAssetsResponse_Asset_AssetType,
@@ -562,9 +561,7 @@ export const returnFullCommandName = <
562561
*/
563562
export const returnCommandsWithLogs = (
564563
context: ExtensionContext,
565-
isProduction: boolean,
566564
logger: ServicesLogger,
567-
analytics: Analytics,
568565
): Array<[string, () => Promise<void>]> => {
569566
const commands = returnCommands(() => getServices(context), context)
570567
return Object.entries(commands).map(([name, command]) => [
@@ -573,15 +570,6 @@ export const returnCommandsWithLogs = (
573570
try {
574571
// eslint-disable-next-line no-console
575572
console.info(`starting command: ${name}`)
576-
if (isProduction) {
577-
analytics.track({
578-
anonymousId: vscode.env.machineId,
579-
event: `Execute Command: ${name}`,
580-
properties: {
581-
environment: vscode.env.appHost,
582-
},
583-
})
584-
}
585573
const result = await command()
586574
if (isErr(result)) {
587575
logger.captureException(result.error)

js/packages/quary-extension/src/web/extension.ts

+7-25
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/* eslint-disable no-console */
22
import * as vscode from 'vscode'
3-
import * as Sentry from '@sentry/browser'
4-
import { Analytics } from '@june-so/analytics-node'
53
import { returnCommandsWithLogs } from './commands'
64
import { VSCodeInstanceContext } from './servicesContext'
75
import {
@@ -14,7 +12,6 @@ import { AuthenticationProviderSnowflake } from './authenticationProviderSnowfla
1412
import {
1513
ServicesLogger,
1614
servicesLoggerExceptionThrower,
17-
servicesLoggerSentry,
1815
} from './servicesLogger'
1916
import { ChartEditorProvider } from './chartCustomEditor'
2017
import { getPreInitServices } from './services'
@@ -25,45 +22,30 @@ export const commandName = (s: string): string => 'quary.' + s
2522

2623
async function activateCommands(
2724
context: vscode.ExtensionContext,
28-
isProduction: boolean,
2925
logger: ServicesLogger,
30-
analytics: Analytics,
3126
) {
32-
returnCommandsWithLogs(context, isProduction, logger, analytics).forEach(
33-
([name, func]) =>
34-
context.subscriptions.push(
35-
vscode.commands.registerCommand(commandName(name), func),
36-
),
27+
returnCommandsWithLogs(context, logger).forEach(([name, func]) =>
28+
context.subscriptions.push(
29+
vscode.commands.registerCommand(commandName(name), func),
30+
),
3731
)
3832
}
3933

40-
const SENTRY_DSN =
41-
'https://360983d50cb2c46d0d39778ce2a3443e@o4506173297524736.ingest.sentry.io/4506175684673536'
42-
const JUNE_ANALYTICS = '9PbCtSiPLLggvaE5'
43-
4434
export async function activate(context: vscode.ExtensionContext) {
4535
const hostDetails = await VSCodeInstanceContext.getHostDetails()
4636
const isProduction = hostDetails.environment === 'production'
4737

4838
console.info(`starting extension activation with details: ${hostDetails}`)
4939

50-
const logger = isProduction
51-
? servicesLoggerSentry(SENTRY_DSN, hostDetails.version)
52-
: servicesLoggerExceptionThrower()
53-
54-
Sentry.setTags(hostDetails)
55-
56-
const analytics = new Analytics(JUNE_ANALYTICS)
40+
const logger = servicesLoggerExceptionThrower()
5741

5842
// Register auth providers
59-
context.subscriptions.push(
60-
new AuthenticationProviderQuary(context, logger, analytics),
61-
)
43+
context.subscriptions.push(new AuthenticationProviderQuary(context, logger))
6244
context.subscriptions.push(new AuthenticationProviderBigQuery(context))
6345
context.subscriptions.push(new AuthenticationProviderSnowflake(context))
6446

6547
// register: Quary Commands
66-
await activateCommands(context, isProduction, logger, analytics)
48+
await activateCommands(context, logger)
6749

6850
// show walkthrough if the user has recently installed the extension & has not signed in
6951
if (hostDetails.isNewAppInstall) {
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as Sentry from '@sentry/browser'
21
import * as vscode from 'vscode'
32
import { QuaryError } from '@shared/result'
43

@@ -19,23 +18,3 @@ export const servicesLoggerExceptionThrower = (): ServicesLogger => ({
1918
console.info('Logger set user to', user)
2019
},
2120
})
22-
23-
export const servicesLoggerSentry = (
24-
dsn: string,
25-
version: string,
26-
): ServicesLogger => {
27-
Sentry.init({
28-
dsn,
29-
release: version,
30-
})
31-
32-
return {
33-
captureException(error: QuaryError) {
34-
vscode.window.showErrorMessage(`Quary: ${error.message}`)
35-
Sentry.captureException(error)
36-
},
37-
setUser(user: { id: string; email: string } | null): void {
38-
Sentry.setUser(user)
39-
},
40-
}
41-
}

0 commit comments

Comments
 (0)