Skip to content

Commit b828ff4

Browse files
Merge pull request #1073 from NordicSemiconductor/push-lxwtmlutkpnu
Telemetry: Disable sending dependency events
2 parents f5158a8 + 7fa7a79 commit b828ff4

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

Changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ This project does _not_ adhere to
77
[Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
88
every new version is a new major version.
99

10+
## 234.0.0 - 2025-10-21
11+
12+
### Changed
13+
14+
- In Telemetry disabled sending dependency events.
15+
1016
## 233.0.0 - 2025-10-10
1117

1218
### Changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nordicsemiconductor/pc-nrfconnect-shared",
3-
"version": "233.0.0",
3+
"version": "234.0.0",
44
"description": "Shared commodities for developing pc-nrfconnect-* packages",
55
"repository": {
66
"type": "git",

src/telemetry/TelemetrySenderInRenderer.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,24 @@ export default class TelemetrySenderInRenderer extends TelemetrySender {
2424

2525
const accountId = getTelemetryClientId();
2626

27+
// Fix issue with duplicate events being sent https://github.com/microsoft/ApplicationInsights-JS/issues/796
28+
const removeDuplicateEvents = {
29+
isStorageUseDisabled: true,
30+
namePrefix: applicationName,
31+
};
32+
33+
// According to https://github.com/microsoft/ApplicationInsights-JS/issues/2655#issuecomment-3423857757 this might be the way to disable dependency events
34+
const disableDependencyEvents = {
35+
disableAjaxTracking: true,
36+
disableFetchTracking: true,
37+
};
38+
2739
this.client = new ApplicationInsights({
2840
config: {
2941
instrumentationKey: this.INSTRUMENTATION_KEY,
3042
accountId, // to hide with removeAllMetadata
31-
isStorageUseDisabled: true, // fix issue with duplicate events being sent https://github.com/microsoft/ApplicationInsights-JS/issues/796
32-
namePrefix: applicationName, // fix issue with duplicate events being sent https://github.com/microsoft/ApplicationInsights-JS/issues/796
43+
...removeDuplicateEvents,
44+
...disableDependencyEvents,
3345
},
3446
});
3547

0 commit comments

Comments
 (0)