@nordicsemiconductor/pc-nrfconnect-shared 91.0.0 → 92.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Changelog.md
CHANGED
|
@@ -7,6 +7,12 @@ This project does _not_ adhere to
|
|
|
7
7
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
|
|
8
8
|
every new version is a new major version.
|
|
9
9
|
|
|
10
|
+
## 92 - 2023-08-24
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add functionality to send metrics and traces to telemetry.
|
|
15
|
+
|
|
10
16
|
## 91 - 2023-08-23
|
|
11
17
|
|
|
12
18
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" ?>
|
|
2
2
|
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
|
|
3
|
-
<coverage lines-valid="
|
|
3
|
+
<coverage lines-valid="2967" lines-covered="1646" line-rate="0.5547" branches-valid="1454" branches-covered="381" branch-rate="0.262" timestamp="1692883342455" complexity="0" version="0.1">
|
|
4
4
|
<sources>
|
|
5
5
|
<source>/home/vsts/work/1/s</source>
|
|
6
6
|
</sources>
|
|
@@ -6940,7 +6940,7 @@
|
|
|
6940
6940
|
</class>
|
|
6941
6941
|
</classes>
|
|
6942
6942
|
</package>
|
|
6943
|
-
<package name="src.utils" line-rate="0.
|
|
6943
|
+
<package name="src.utils" line-rate="0.6566" branch-rate="0.1653">
|
|
6944
6944
|
<classes>
|
|
6945
6945
|
<class name="appDirs.ts" filename="src/utils/appDirs.ts" line-rate="0.6666" branch-rate="0">
|
|
6946
6946
|
<methods>
|
|
@@ -7283,66 +7283,76 @@
|
|
|
7283
7283
|
<line number="20" hits="5" branch="false"/>
|
|
7284
7284
|
</lines>
|
|
7285
7285
|
</class>
|
|
7286
|
-
<class name="usageData.ts" filename="src/utils/usageData.ts" line-rate="0.
|
|
7286
|
+
<class name="usageData.ts" filename="src/utils/usageData.ts" line-rate="0.41369999999999996" branch-rate="0.0793">
|
|
7287
7287
|
<methods>
|
|
7288
|
-
<method name="(
|
|
7288
|
+
<method name="(anonymous_13)" hits="3" signature="()V">
|
|
7289
7289
|
<lines>
|
|
7290
7290
|
<line number="36" hits="3"/>
|
|
7291
7291
|
</lines>
|
|
7292
7292
|
</method>
|
|
7293
|
-
<method name="(
|
|
7293
|
+
<method name="(anonymous_14)" hits="0" signature="()V">
|
|
7294
7294
|
<lines>
|
|
7295
7295
|
<line number="57" hits="0"/>
|
|
7296
7296
|
</lines>
|
|
7297
7297
|
</method>
|
|
7298
|
-
<method name="(
|
|
7298
|
+
<method name="(anonymous_15)" hits="0" signature="()V">
|
|
7299
7299
|
<lines>
|
|
7300
7300
|
<line number="75" hits="0"/>
|
|
7301
7301
|
</lines>
|
|
7302
7302
|
</method>
|
|
7303
|
-
<method name="(
|
|
7303
|
+
<method name="(anonymous_16)" hits="3" signature="()V">
|
|
7304
7304
|
<lines>
|
|
7305
7305
|
<line number="87" hits="3"/>
|
|
7306
7306
|
</lines>
|
|
7307
7307
|
</method>
|
|
7308
|
-
<method name="(
|
|
7308
|
+
<method name="(anonymous_17)" hits="0" signature="()V">
|
|
7309
7309
|
<lines>
|
|
7310
7310
|
<line number="101" hits="0"/>
|
|
7311
7311
|
</lines>
|
|
7312
7312
|
</method>
|
|
7313
|
-
<method name="(
|
|
7313
|
+
<method name="(anonymous_18)" hits="0" signature="()V">
|
|
7314
7314
|
<lines>
|
|
7315
7315
|
<line number="112" hits="0"/>
|
|
7316
7316
|
</lines>
|
|
7317
7317
|
</method>
|
|
7318
|
-
<method name="(
|
|
7318
|
+
<method name="(anonymous_19)" hits="0" signature="()V">
|
|
7319
7319
|
<lines>
|
|
7320
7320
|
<line number="122" hits="0"/>
|
|
7321
7321
|
</lines>
|
|
7322
7322
|
</method>
|
|
7323
|
-
<method name="(
|
|
7323
|
+
<method name="(anonymous_20)" hits="0" signature="()V">
|
|
7324
7324
|
<lines>
|
|
7325
7325
|
<line number="133" hits="0"/>
|
|
7326
7326
|
</lines>
|
|
7327
7327
|
</method>
|
|
7328
|
-
<method name="(
|
|
7328
|
+
<method name="(anonymous_21)" hits="0" signature="()V">
|
|
7329
7329
|
<lines>
|
|
7330
7330
|
<line number="144" hits="0"/>
|
|
7331
7331
|
</lines>
|
|
7332
7332
|
</method>
|
|
7333
|
-
<method name="(
|
|
7333
|
+
<method name="(anonymous_22)" hits="0" signature="()V">
|
|
7334
7334
|
<lines>
|
|
7335
7335
|
<line number="162" hits="0"/>
|
|
7336
7336
|
</lines>
|
|
7337
7337
|
</method>
|
|
7338
|
-
<method name="(
|
|
7338
|
+
<method name="(anonymous_23)" hits="0" signature="()V">
|
|
7339
7339
|
<lines>
|
|
7340
|
-
<line number="
|
|
7340
|
+
<line number="171" hits="0"/>
|
|
7341
7341
|
</lines>
|
|
7342
7342
|
</method>
|
|
7343
|
-
<method name="(
|
|
7343
|
+
<method name="(anonymous_24)" hits="0" signature="()V">
|
|
7344
7344
|
<lines>
|
|
7345
|
-
<line number="
|
|
7345
|
+
<line number="178" hits="0"/>
|
|
7346
|
+
</lines>
|
|
7347
|
+
</method>
|
|
7348
|
+
<method name="(anonymous_25)" hits="0" signature="()V">
|
|
7349
|
+
<lines>
|
|
7350
|
+
<line number="189" hits="0"/>
|
|
7351
|
+
</lines>
|
|
7352
|
+
</method>
|
|
7353
|
+
<method name="(anonymous_26)" hits="1" signature="()V">
|
|
7354
|
+
<lines>
|
|
7355
|
+
<line number="197" hits="1"/>
|
|
7346
7356
|
</lines>
|
|
7347
7357
|
</method>
|
|
7348
7358
|
</methods>
|
|
@@ -7395,13 +7405,16 @@
|
|
|
7395
7405
|
<line number="165" hits="0" branch="false"/>
|
|
7396
7406
|
<line number="167" hits="0" branch="false"/>
|
|
7397
7407
|
<line number="168" hits="0" branch="false"/>
|
|
7398
|
-
<line number="
|
|
7399
|
-
<line number="
|
|
7400
|
-
<line number="178" hits="
|
|
7401
|
-
<line number="
|
|
7402
|
-
<line number="
|
|
7403
|
-
<line number="
|
|
7404
|
-
<line number="
|
|
7408
|
+
<line number="171" hits="4" branch="false"/>
|
|
7409
|
+
<line number="172" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7410
|
+
<line number="178" hits="4" branch="false"/>
|
|
7411
|
+
<line number="179" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7412
|
+
<line number="189" hits="4" branch="false"/>
|
|
7413
|
+
<line number="190" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7414
|
+
<line number="191" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7415
|
+
<line number="197" hits="4" branch="false"/>
|
|
7416
|
+
<line number="198" hits="1" branch="false"/>
|
|
7417
|
+
<line number="201" hits="4" branch="false"/>
|
|
7405
7418
|
</lines>
|
|
7406
7419
|
</class>
|
|
7407
7420
|
<class name="useHotKey.ts" filename="src/utils/useHotKey.ts" line-rate="0.7916" branch-rate="0.6">
|
package/package.json
CHANGED
package/src/utils/usageData.ts
CHANGED
|
@@ -168,6 +168,19 @@ export const sendUsageData = <T extends string>(action: T, label?: string) => {
|
|
|
168
168
|
eventQueue = [];
|
|
169
169
|
};
|
|
170
170
|
|
|
171
|
+
export const sendMetric = (name: string, average: number) => {
|
|
172
|
+
insights?.trackMetric({
|
|
173
|
+
name,
|
|
174
|
+
average,
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export const sendTrace = (message: string) => {
|
|
179
|
+
insights?.trackTrace({
|
|
180
|
+
message,
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
|
|
171
184
|
/**
|
|
172
185
|
* Send error usage data event to Application Insights and also show it in the logger view
|
|
173
186
|
* @param {string} error The event action
|
|
@@ -178,10 +191,6 @@ export const sendErrorReport = (error: string) => {
|
|
|
178
191
|
insights?.trackException({
|
|
179
192
|
exception: new Error(error),
|
|
180
193
|
});
|
|
181
|
-
sendUsageData(
|
|
182
|
-
'Report error',
|
|
183
|
-
`${process.platform}; ${process.arch}; ${error}`
|
|
184
|
-
);
|
|
185
194
|
};
|
|
186
195
|
|
|
187
196
|
let logger: winston.Logger | undefined;
|
|
@@ -45,6 +45,8 @@ export declare const reset: () => void;
|
|
|
45
45
|
* @returns {void}
|
|
46
46
|
*/
|
|
47
47
|
export declare const sendUsageData: <T extends string>(action: T, label?: string) => void;
|
|
48
|
+
export declare const sendMetric: (name: string, average: number) => void;
|
|
49
|
+
export declare const sendTrace: (message: string) => void;
|
|
48
50
|
/**
|
|
49
51
|
* Send error usage data event to Application Insights and also show it in the logger view
|
|
50
52
|
* @param {string} error The event action
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usageData.d.ts","sourceRoot":"","sources":["../../../../src/utils/usageData.ts"],"names":[],"mappings":"AAQA,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAmBvD;;;;;GAKG;AACH,eAAO,MAAM,IAAI,gBAAiB,WAAW,SA4C5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,eAOzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,2BAIrB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,MAAM,YAGlB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,YAGnB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,KAAK,YAGjB,CAAC;AAoBF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,wCAAyC,MAAM,SAOxE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,UAAW,MAAM,
|
|
1
|
+
{"version":3,"file":"usageData.d.ts","sourceRoot":"","sources":["../../../../src/utils/usageData.ts"],"names":[],"mappings":"AAQA,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,KAAK,EAAE,WAAW,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