@ms-cloudpack/external-telemetry 0.5.78 → 0.5.80
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,
|
|
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"}
|
|
@@ -17,8 +17,11 @@ export async function reportExternalTelemetryEvent(options) {
|
|
|
17
17
|
connectionString: connectionString,
|
|
18
18
|
logLevel: options.logLevel,
|
|
19
19
|
});
|
|
20
|
-
telemetryClient.
|
|
21
|
-
|
|
20
|
+
const externalTelemetrySpan = telemetryClient.tracer.startSpan(external, {
|
|
21
|
+
attributes: {
|
|
22
|
+
appName: options.appName || (await getAppName(options.appPath)) || '<unknown>',
|
|
23
|
+
},
|
|
24
|
+
});
|
|
22
25
|
externalTelemetrySpan.addEvent(`${external}-${options.eventName}`, options.attributes);
|
|
23
26
|
externalTelemetrySpan.end();
|
|
24
27
|
await telemetryClient.shutdown();
|
|
@@ -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,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CAAqC,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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/external-telemetry",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.80",
|
|
4
4
|
"description": "Reporting external telemetry which is not about of cloudpack internals.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@ms-cloudpack/common-types": "^0.23.
|
|
18
|
-
"@ms-cloudpack/config": "^0.31.
|
|
17
|
+
"@ms-cloudpack/common-types": "^0.23.2",
|
|
18
|
+
"@ms-cloudpack/config": "^0.31.7",
|
|
19
19
|
"@ms-cloudpack/json-utilities": "^0.1.8",
|
|
20
|
-
"@ms-cloudpack/package-utilities": "^10.2.
|
|
21
|
-
"@ms-cloudpack/telemetry": "^0.
|
|
20
|
+
"@ms-cloudpack/package-utilities": "^10.2.7",
|
|
21
|
+
"@ms-cloudpack/telemetry": "^0.8.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
|