1
1
/* eslint-disable no-console */
2
2
import * as vscode from 'vscode'
3
- import * as Sentry from '@sentry/browser'
4
- import { Analytics } from '@june-so/analytics-node'
5
3
import { returnCommandsWithLogs } from './commands'
6
4
import { VSCodeInstanceContext } from './servicesContext'
7
5
import {
@@ -14,7 +12,6 @@ import { AuthenticationProviderSnowflake } from './authenticationProviderSnowfla
14
12
import {
15
13
ServicesLogger ,
16
14
servicesLoggerExceptionThrower ,
17
- servicesLoggerSentry ,
18
15
} from './servicesLogger'
19
16
import { ChartEditorProvider } from './chartCustomEditor'
20
17
import { getPreInitServices } from './services'
@@ -25,45 +22,30 @@ export const commandName = (s: string): string => 'quary.' + s
25
22
26
23
async function activateCommands (
27
24
context : vscode . ExtensionContext ,
28
- isProduction : boolean ,
29
25
logger : ServicesLogger ,
30
- analytics : Analytics ,
31
26
) {
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
+ ) ,
37
31
)
38
32
}
39
33
40
- const SENTRY_DSN =
41
- 'https://360983d50cb2c46d0d39778ce2a3443e@o4506173297524736.ingest.sentry.io/4506175684673536'
42
- const JUNE_ANALYTICS = '9PbCtSiPLLggvaE5'
43
-
44
34
export async function activate ( context : vscode . ExtensionContext ) {
45
35
const hostDetails = await VSCodeInstanceContext . getHostDetails ( )
46
36
const isProduction = hostDetails . environment === 'production'
47
37
48
38
console . info ( `starting extension activation with details: ${ hostDetails } ` )
49
39
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 ( )
57
41
58
42
// Register auth providers
59
- context . subscriptions . push (
60
- new AuthenticationProviderQuary ( context , logger , analytics ) ,
61
- )
43
+ context . subscriptions . push ( new AuthenticationProviderQuary ( context , logger ) )
62
44
context . subscriptions . push ( new AuthenticationProviderBigQuery ( context ) )
63
45
context . subscriptions . push ( new AuthenticationProviderSnowflake ( context ) )
64
46
65
47
// register: Quary Commands
66
- await activateCommands ( context , isProduction , logger , analytics )
48
+ await activateCommands ( context , logger )
67
49
68
50
// show walkthrough if the user has recently installed the extension & has not signed in
69
51
if ( hostDetails . isNewAppInstall ) {
0 commit comments