Skip to content

Commit

Permalink
Merge pull request #851 from NordicSemiconductor/fix/azure-insights-c…
Browse files Browse the repository at this point in the history
…ommom-props

Fix: send common app metadata to insights
  • Loading branch information
kylebonnici authored Dec 13, 2023
2 parents 6aa7120 + 9ad5791 commit 6e6f8d0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ This project does _not_ adhere to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
every new version is a new major version.

## 142.0.0 - 2023-12-13

### Fixed

- `UsageData` sends common app metadata

## 141.0.0 - 2023-12-12

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nordicsemiconductor/pc-nrfconnect-shared",
"version": "141.0.0",
"version": "142.0.0",
"description": "Shared commodities for developing pc-nrfconnect-* packages",
"repository": {
"type": "git",
Expand Down
14 changes: 8 additions & 6 deletions src/utils/usageDataMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ const init = () => {
envelope.data.baseData = { name: envelope.data?.baseData.name };
} else {
envelope.tags['ai.cloud.roleInstance'] = undefined; // remove PC name
envelope.data.baseData = {
applicationName,
applicationVersion,
isDevelopment,
...envelope.data.baseData,
};
if (envelope.data.baseData) {
envelope.data.baseData.properties = {
applicationName,
applicationVersion,
isDevelopment,
...envelope.data.baseData.properties,
};
}
}

return true;
Expand Down
4 changes: 2 additions & 2 deletions src/utils/usageDataRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ const init = async () => {
name: applicationName,
};
envelope.ext = { ...envelope.ext, trace };
envelope.baseData = {
envelope.data = {
...envelope.data,
applicationName,
applicationVersion,
isDevelopment,
source,
...envelope.baseData,
};
}
});
Expand Down

0 comments on commit 6e6f8d0

Please sign in to comment.