Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
32681611
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
32681611
编写于
9月 03, 2017
作者:
K
kieferrm
提交者:
Kai Maetzel
9月 25, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
classify common properties
上级
43c99472
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
0 deletion
+22
-0
src/vs/code/electron-browser/sharedProcessMain.ts
src/vs/code/electron-browser/sharedProcessMain.ts
+1
-0
src/vs/code/electron-main/app.ts
src/vs/code/electron-main/app.ts
+1
-0
src/vs/platform/telemetry/node/commonProperties.ts
src/vs/platform/telemetry/node/commonProperties.ts
+10
-0
src/vs/platform/telemetry/node/workbenchCommonProperties.ts
src/vs/platform/telemetry/node/workbenchCommonProperties.ts
+10
-0
未找到文件。
src/vs/code/electron-browser/sharedProcessMain.ts
浏览文件 @
32681611
...
...
@@ -109,6 +109,7 @@ function main(server: Server, initData: ISharedProcessInitData): void {
const
config
:
ITelemetryServiceConfig
=
{
appender
,
commonProperties
:
resolveCommonProperties
(
product
.
commit
,
pkg
.
version
,
installSource
)
// __GDPR__COMMON__ "common.machineId" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
.
then
(
result
=>
Object
.
defineProperty
(
result
,
'
common.machineId
'
,
{
get
:
()
=>
storageService
.
get
(
machineIdStorageKey
),
enumerable
:
true
...
...
src/vs/code/electron-main/app.ts
浏览文件 @
32681611
...
...
@@ -295,6 +295,7 @@ export class CodeApplication {
const
channel
=
getDelayedChannel
<
ITelemetryAppenderChannel
>
(
this
.
sharedProcessClient
.
then
(
c
=>
c
.
getChannel
(
'
telemetryAppender
'
)));
const
appender
=
new
TelemetryAppenderClient
(
channel
);
const
commonProperties
=
resolveCommonProperties
(
product
.
commit
,
pkg
.
version
,
this
.
environmentService
.
installSource
)
// __GDPR__COMMON__ "common.machineId" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
.
then
(
result
=>
Object
.
defineProperty
(
result
,
'
common.machineId
'
,
{
get
:
()
=>
this
.
storageService
.
getItem
(
machineIdStorageKey
),
enumerable
:
true
...
...
src/vs/platform/telemetry/node/commonProperties.ts
浏览文件 @
32681611
...
...
@@ -14,12 +14,19 @@ export const machineIdIpcChannel = 'vscode:machineId';
export
function
resolveCommonProperties
(
commit
:
string
,
version
:
string
,
source
:
string
):
TPromise
<
{
[
name
:
string
]:
string
;
}
>
{
const
result
:
{
[
name
:
string
]:
string
;
}
=
Object
.
create
(
null
);
// __GDPR__COMMON__ "sessionID" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result
[
'
sessionID
'
]
=
uuid
.
generateUuid
()
+
Date
.
now
();
// __GDPR__COMMON__ "commitHash" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result
[
'
commitHash
'
]
=
commit
;
// __GDPR__COMMON__ "version" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result
[
'
version
'
]
=
version
;
// __GDPR__COMMON__ "common.osVersion" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result
[
'
common.osVersion
'
]
=
os
.
release
();
// __GDPR__COMMON__ "common.platfrom" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result
[
'
common.platform
'
]
=
Platform
.
Platform
[
Platform
.
platform
];
// __GDPR__COMMON__ "common.nodePlatform" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result
[
'
common.nodePlatform
'
]
=
process
.
platform
;
// __GDPR__COMMON__ "common.nodeArch" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result
[
'
common.nodeArch
'
]
=
process
.
arch
;
result
[
'
common.source
'
]
=
source
;
...
...
@@ -27,14 +34,17 @@ export function resolveCommonProperties(commit: string, version: string, source:
let
seq
=
0
;
const
startTime
=
Date
.
now
();
Object
.
defineProperties
(
result
,
{
// __GDPR__COMMON__ "timestamp" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
'
timestamp
'
:
{
get
:
()
=>
new
Date
(),
enumerable
:
true
},
// __GDPR__COMMON__ "common.timesincesessionstart" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
'
common.timesincesessionstart
'
:
{
get
:
()
=>
Date
.
now
()
-
startTime
,
enumerable
:
true
},
// __GDPR__COMMON__ "common.sequence" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
'
common.sequence
'
:
{
get
:
()
=>
seq
++
,
enumerable
:
true
...
...
src/vs/platform/telemetry/node/workbenchCommonProperties.ts
浏览文件 @
32681611
...
...
@@ -16,8 +16,11 @@ const SQM_KEY: string = '\\Software\\Microsoft\\SQMClient';
export
function
resolveWorkbenchCommonProperties
(
storageService
:
IStorageService
,
commit
:
string
,
version
:
string
,
source
:
string
):
TPromise
<
{
[
name
:
string
]:
string
}
>
{
return
resolveCommonProperties
(
commit
,
version
,
source
).
then
(
result
=>
{
// __GDPR__COMMON__ "common.version.shell" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result
[
'
common.version.shell
'
]
=
process
.
versions
&&
(
<
any
>
process
).
versions
[
'
electron
'
];
// __GDPR__COMMON__ "common.version.renderer" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result
[
'
common.version.renderer
'
]
=
process
.
versions
&&
(
<
any
>
process
).
versions
[
'
chrome
'
];
// __GDPR__COMMON__ "common.osVersion" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result
[
'
common.osVersion
'
]
=
os
.
release
();
const
lastSessionDate
=
storageService
.
get
(
'
telemetry.lastSessionDate
'
);
...
...
@@ -25,16 +28,23 @@ export function resolveWorkbenchCommonProperties(storageService: IStorageService
storageService
.
store
(
'
telemetry.firstSessionDate
'
,
firstSessionDate
);
storageService
.
store
(
'
telemetry.lastSessionDate
'
,
new
Date
().
toUTCString
());
// __GDPR__COMMON__ "common.firstSessionDate" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result
[
'
common.firstSessionDate
'
]
=
firstSessionDate
;
// __GDPR__COMMON__ "common.lastSessionDate" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result
[
'
common.lastSessionDate
'
]
=
lastSessionDate
;
// __GDPR__COMMON__ "common.isNewSession" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
result
[
'
common.isNewSession
'
]
=
!
lastSessionDate
?
'
1
'
:
'
0
'
;
const
promises
:
TPromise
<
any
>
[]
=
[];
// __GDPR__COMMON__ "common.instanceId" : { "endPoint": "none", "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" }
promises
.
push
(
getOrCreateInstanceId
(
storageService
).
then
(
value
=>
result
[
'
common.instanceId
'
]
=
value
));
// __GDPR__COMMON__ "common.machineId" : { "endPoint": "none", "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" }
promises
.
push
(
getOrCreateMachineId
(
storageService
).
then
(
value
=>
result
[
'
common.machineId
'
]
=
value
));
if
(
process
.
platform
===
'
win32
'
)
{
// __GDPR__COMMON__ "common.sqm.userid" : { "endPoint": "SqmUserId", "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" }
promises
.
push
(
getSqmUserId
(
storageService
).
then
(
value
=>
result
[
'
common.sqm.userid
'
]
=
value
));
// __GDPR__COMMON__ "common.sqm.machineid" : { "endPoint": "SqmMachineId", "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" }
promises
.
push
(
getSqmMachineId
(
storageService
).
then
(
value
=>
result
[
'
common.sqm.machineid
'
]
=
value
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录