@@ -100,17 +100,20 @@ message Event {
100100 optional EventFeatureFlags feature_flags = 8 ;
101101 // Optional marketing campaign tracking parameters.
102102 //
103- // 🚨 SECURITY: Do NOT export this metadata by default, as it can contain
104- // sensitive data. Currently, only Sourcegraph.com should export this .
103+ // 🚨 SECURITY: This metadata is NEVER exported from an instance, and is only
104+ // exported for events tracked in the public Sourcegraph.com instance .
105105 optional EventMarketingTracking marketing_tracking = 9 ;
106106}
107107
108108message EventSource {
109109 message Server {
110+ // Version of the Sourcegraph server.
110111 string version = 1 ;
111112 }
112113 message Client {
114+ // Source client of the event.
113115 string name = 1 ;
116+ // Version of the cleint.
114117 optional string version = 2 ;
115118 }
116119
@@ -122,18 +125,22 @@ message EventSource {
122125
123126message EventParameters {
124127 // Version of the event parameters, used for indicating the "shape" of this
125- // event's metadata, beginning at 0.
128+ // event's metadata, beginning at 0. Useful for denoting if the shape of
129+ // metadata has changed in any way.
126130 int32 version = 1 ;
127- // Strictly typed metadata, restricted to integer values.
131+ // Strictly typed metadata, restricted to integer values to avoid accidentally
132+ // exporting sensitive or private data.
128133 map <string , int64 > metadata = 2 ;
129134 // Additional potentially sensitive metadata - i.e. not restricted to integer
130135 // values.
131-
132- // 🚨 SECURITY: Do NOT export this metadata by default, as it can contain
133- // arbitrarily-shaped data that may accidentally contain sensitive contents.
134136 //
135- // This should only be exported on an allowlist basis based on combinations
136- // of event feature and action, alongside careful audit of callsites.
137+ // 🚨 SECURITY: This metadata is NOT exported from instances by default, as it
138+ // can contain arbitrarily-shaped data that may accidentally contain sensitive
139+ // or private contents.
140+ //
141+ // This metadata is only exported on an allowlist basis based on terms of
142+ // use agreements and combinations of event feature and action, alongside
143+ // careful audit of callsites.
137144 optional google.protobuf.Struct private_metadata = 3 ;
138145 // Optional billing-related metadata.
139146 optional EventBillingMetadata billing_metadata = 4 ;
@@ -147,13 +154,14 @@ message EventBillingMetadata {
147154}
148155
149156message EventUser {
150- // Database user ID of signed in user.
157+ // Database user ID of signed in user. User IDs are specific to a Sourcegraph
158+ // instance, and not universal.
151159 //
152160 // We use an int64 as an ID because in Sourcegraph, database user IDs are
153161 // always integers.
154162 optional int64 user_id = 1 ;
155- // Randomized unique identifier for client (i.e. stored in localstorage in web
156- // client).
163+ // Randomized unique identifier for an actor (e.g. stored in localstorage in
164+ // web client).
157165 optional string anonymous_user_id = 2 ;
158166}
159167
@@ -167,13 +175,26 @@ message EventFeatureFlags {
167175 map <string , string > flags = 1 ;
168176}
169177
178+ // Marketing campaign tracking metadata.
179+ //
180+ // 🚨 SECURITY: This metadata is NEVER exported from private Sourcegraph
181+ // instances, and is only exported for events tracked in the public
182+ // Sourcegraph.com instance.
170183message EventMarketingTracking {
184+ // URL the event occurred on.
171185 optional string url = 1 ;
186+ // Initial URL the user landed on.
172187 optional string first_source_url = 2 ;
188+ // Cohort ID to identify the user as part of a specific A/B test.
173189 optional string cohort_id = 3 ;
190+ // Referrer URL that refers the user to Sourcegraph.
174191 optional string referrer = 4 ;
192+ // Last source URL visited by the user.
175193 optional string last_source_url = 5 ;
194+ // Device session ID to identify the user's session.
176195 optional string device_session_id = 6 ;
196+ // Session referrer URL for the user.
177197 optional string session_referrer = 7 ;
198+ // First URL the user visited in their current session.
178199 optional string session_first_url = 8 ;
179200}
0 commit comments