@@ -40,9 +40,13 @@ export function createSentryInstance({
40
40
sentryScope : Scope ;
41
41
sentryClient : Client ;
42
42
} {
43
+ // setting to undefined will ensure that no data is sent
43
44
let sampleRate = undefined ;
44
45
let tracesSampleRate = undefined ;
45
46
// just being really explicit here as to what we're checking for
47
+ // currently we're not tracking dry runs as they're more for debugging, and
48
+ // are not interacting with our systems - up for debate whether we want to
49
+ // keep this
46
50
if ( enableTelemetry === true && isDryRun === false ) {
47
51
sampleRate = 1 ;
48
52
tracesSampleRate = 1 ;
@@ -65,6 +69,7 @@ export function createSentryInstance({
65
69
66
70
beforeSend : ( event ) => {
67
71
event . exception ?. values ?. forEach ( ( exception ) => {
72
+ // Stack track may have some PII
68
73
delete exception . stacktrace ;
69
74
} ) ;
70
75
@@ -110,12 +115,15 @@ export function setTelemetryDataOnScope(
110
115
bundler : string ,
111
116
metaFramework ?: string ,
112
117
) {
118
+ // some general information about where the plugins are being ram
113
119
scope . setTag ( "node" , process . version ) ;
114
120
scope . setTag ( "platform" , process . platform ) ;
115
121
122
+ // determine which plugin and it's version that's being used
116
123
scope . setTag ( "plugin.name" , pluginInfo . name ) ;
117
124
scope . setTag ( "plugin.version" , pluginInfo . version ) ;
118
125
126
+ // determine the method of authorization
119
127
let authMode = options . dryRun ? "dry-run" : "tokenless" ;
120
128
if ( options . uploadToken && options . uploadToken !== "" ) {
121
129
authMode = "token" ;
@@ -124,12 +132,15 @@ export function setTelemetryDataOnScope(
124
132
}
125
133
scope . setTag ( "auth_mode" , authMode ) ;
126
134
135
+ // determine what git services are being used to auth with tokenless
127
136
if ( options . gitService ) {
128
137
scope . setTag ( "git_service" , options . gitService ) ;
129
138
}
130
139
140
+ // want to see if we're mainly running in ci envs compared to local builds
131
141
scope . setTag ( "ci" , ! ! process . env . CI ) ;
132
142
143
+ // track which bundlers and meta-frameworks are being used
133
144
scope . setTag ( "meta_framework" , metaFramework ?? "none" ) ;
134
145
scope . setTag ( "bundler" , bundler ) ;
135
146
}
@@ -164,8 +175,8 @@ export function telemetryPlugin({
164
175
) ;
165
176
startSpan (
166
177
{
167
- name : "Codecov Bundler Plugin execution " ,
168
- op : "bundler-plugin-startup " ,
178
+ name : "Codecov Bundler Plugin Execution " ,
179
+ op : "bundler-plugin-execution " ,
169
180
scope : sentryScope ,
170
181
} ,
171
182
( ) => {
0 commit comments