@ms-cloudpack/external-telemetry 0.5.91 → 0.5.93

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.
@@ -1 +1 @@
1
- {"version":3,"file":"reportExternalTelemetryEvent.d.ts","sourceRoot":"","sources":["../src/reportExternalTelemetryEvent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAIhF;;;GAGG;AACH,wBAAsB,4BAA4B,CAAC,OAAO,EAAE,sBAAsB,iBAuBjF"}
1
+ {"version":3,"file":"reportExternalTelemetryEvent.d.ts","sourceRoot":"","sources":["../src/reportExternalTelemetryEvent.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAIhF;;;GAGG;AACH,wBAAsB,4BAA4B,CAAC,OAAO,EAAE,sBAAsB,iBAuBjF"}
@@ -1,4 +1,5 @@
1
1
  import { readConfig } from '@ms-cloudpack/config';
2
+ import { environmentInfo } from '@ms-cloudpack/environment';
2
3
  import { createTelemetryClient } from '@ms-cloudpack/telemetry';
3
4
  import { getVersion } from '@ms-cloudpack/package-utilities';
4
5
  import { getAppName } from './getAppName.js';
@@ -9,7 +10,7 @@ const external = 'EXTERNAL';
9
10
  */
10
11
  export async function reportExternalTelemetryEvent(options) {
11
12
  const { telemetry } = await readConfig(options.appPath);
12
- const connectionString = telemetry?.connectionString || process.env.CLOUDPACK_TELEMETRY_CONNECTION_STRING;
13
+ const connectionString = telemetry?.connectionString || environmentInfo.cloudpack.telemetryConnectionString;
13
14
  const telemetryClient = await createTelemetryClient({
14
15
  productVersion: getVersion(import.meta.url),
15
16
  serviceName: 'external-telemetry',
@@ -1 +1 @@
1
- {"version":3,"file":"reportExternalTelemetryEvent.js","sourceRoot":"","sources":["../src/reportExternalTelemetryEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5B;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,OAA+B;IAChF,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,MAAM,gBAAgB,GAAG,SAAS,EAAE,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC;IAE1G,MAAM,eAAe,GAAG,MAAM,qBAAqB,CAAC;QAClD,cAAc,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;QAC3C,WAAW,EAAE,oBAAoB;QACjC,gBAAgB,EAAE,WAAW;QAC7B,gBAAgB,EAAE,gBAAgB;QAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC3B,CAAC,CAAC;IAEH,MAAM,qBAAqB,GAAG,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE;QACvE,UAAU,EAAE;YACV,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,CAAC,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,WAAW;SAC/E;KACF,CAAC,CAAC;IAEH,qBAAqB,CAAC,QAAQ,CAAC,GAAG,QAAQ,IAAI,OAAO,CAAC,SAAS,EAAE,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAEvF,qBAAqB,CAAC,GAAG,EAAE,CAAC;IAE5B,MAAM,eAAe,CAAC,QAAQ,EAAE,CAAC;AACnC,CAAC","sourcesContent":["import { readConfig } from '@ms-cloudpack/config';\nimport { createTelemetryClient } from '@ms-cloudpack/telemetry';\nimport { getVersion } from '@ms-cloudpack/package-utilities';\nimport { getAppName } from './getAppName.js';\nimport type { ReportTelemetryOptions } from './types/ReportTelemetryOptions.js';\n\nconst external = 'EXTERNAL';\n\n/**\n * Report an external telemetry event to the CloudPack telemetry service.\n * @param options - The options for reporting the event.\n */\nexport async function reportExternalTelemetryEvent(options: ReportTelemetryOptions) {\n const { telemetry } = await readConfig(options.appPath);\n const connectionString = telemetry?.connectionString || process.env.CLOUDPACK_TELEMETRY_CONNECTION_STRING;\n\n const telemetryClient = await createTelemetryClient({\n productVersion: getVersion(import.meta.url),\n serviceName: 'external-telemetry',\n serviceNamespace: 'cloudpack',\n connectionString: connectionString,\n logLevel: options.logLevel,\n });\n\n const externalTelemetrySpan = telemetryClient.tracer.startSpan(external, {\n attributes: {\n appName: options.appName || (await getAppName(options.appPath)) || '<unknown>',\n },\n });\n\n externalTelemetrySpan.addEvent(`${external}-${options.eventName}`, options.attributes);\n\n externalTelemetrySpan.end();\n\n await telemetryClient.shutdown();\n}\n"]}
1
+ {"version":3,"file":"reportExternalTelemetryEvent.js","sourceRoot":"","sources":["../src/reportExternalTelemetryEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5B;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,OAA+B;IAChF,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,MAAM,gBAAgB,GAAG,SAAS,EAAE,gBAAgB,IAAI,eAAe,CAAC,SAAS,CAAC,yBAAyB,CAAC;IAE5G,MAAM,eAAe,GAAG,MAAM,qBAAqB,CAAC;QAClD,cAAc,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;QAC3C,WAAW,EAAE,oBAAoB;QACjC,gBAAgB,EAAE,WAAW;QAC7B,gBAAgB,EAAE,gBAAgB;QAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC3B,CAAC,CAAC;IAEH,MAAM,qBAAqB,GAAG,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE;QACvE,UAAU,EAAE;YACV,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,CAAC,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,WAAW;SAC/E;KACF,CAAC,CAAC;IAEH,qBAAqB,CAAC,QAAQ,CAAC,GAAG,QAAQ,IAAI,OAAO,CAAC,SAAS,EAAE,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAEvF,qBAAqB,CAAC,GAAG,EAAE,CAAC;IAE5B,MAAM,eAAe,CAAC,QAAQ,EAAE,CAAC;AACnC,CAAC","sourcesContent":["import { readConfig } from '@ms-cloudpack/config';\nimport { environmentInfo } from '@ms-cloudpack/environment';\nimport { createTelemetryClient } from '@ms-cloudpack/telemetry';\nimport { getVersion } from '@ms-cloudpack/package-utilities';\nimport { getAppName } from './getAppName.js';\nimport type { ReportTelemetryOptions } from './types/ReportTelemetryOptions.js';\n\nconst external = 'EXTERNAL';\n\n/**\n * Report an external telemetry event to the CloudPack telemetry service.\n * @param options - The options for reporting the event.\n */\nexport async function reportExternalTelemetryEvent(options: ReportTelemetryOptions) {\n const { telemetry } = await readConfig(options.appPath);\n const connectionString = telemetry?.connectionString || environmentInfo.cloudpack.telemetryConnectionString;\n\n const telemetryClient = await createTelemetryClient({\n productVersion: getVersion(import.meta.url),\n serviceName: 'external-telemetry',\n serviceNamespace: 'cloudpack',\n connectionString: connectionString,\n logLevel: options.logLevel,\n });\n\n const externalTelemetrySpan = telemetryClient.tracer.startSpan(external, {\n attributes: {\n appName: options.appName || (await getAppName(options.appPath)) || '<unknown>',\n },\n });\n\n externalTelemetrySpan.addEvent(`${external}-${options.eventName}`, options.attributes);\n\n externalTelemetrySpan.end();\n\n await telemetryClient.shutdown();\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/external-telemetry",
3
- "version": "0.5.91",
3
+ "version": "0.5.93",
4
4
  "description": "Reporting external telemetry which is not about of cloudpack internals.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,11 +14,12 @@
14
14
  }
15
15
  },
16
16
  "dependencies": {
17
- "@ms-cloudpack/common-types": "^0.23.6",
18
- "@ms-cloudpack/config": "^0.33.3",
19
- "@ms-cloudpack/json-utilities": "^0.1.8",
20
- "@ms-cloudpack/package-utilities": "^10.4.2",
21
- "@ms-cloudpack/telemetry": "^0.10.1"
17
+ "@ms-cloudpack/common-types": "^0.23.7",
18
+ "@ms-cloudpack/config": "^0.33.4",
19
+ "@ms-cloudpack/environment": "^0.1.1",
20
+ "@ms-cloudpack/json-utilities": "^0.1.9",
21
+ "@ms-cloudpack/package-utilities": "^11.0.0",
22
+ "@ms-cloudpack/telemetry": "^0.10.3"
22
23
  },
23
24
  "devDependencies": {
24
25
  "@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
@@ -1,11 +0,0 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.47.11"
9
- }
10
- ]
11
- }