@ms-cloudpack/cli 0.48.1 → 0.49.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/lib/initTelemetry.js +2 -2
- package/lib/initTelemetry.js.map +1 -1
- package/package.json +11 -11
package/lib/initTelemetry.js
CHANGED
|
@@ -9,14 +9,14 @@ import { registerPerformanceObservers } from './performance/registerPerformanceO
|
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
11
|
export async function initTelemetry(options, taskReporter) {
|
|
12
|
-
const
|
|
12
|
+
const connectionString = options.telemetryConfig?.connectionString || process.env.CLOUDPACK_TELEMETRY_CONNECTION_STRING;
|
|
13
13
|
const logLevel = options.useVerboseLogging ? 'VERBOSE' : options.useDebugLogging ? 'DEBUG' : undefined;
|
|
14
14
|
if (!options.useDebugLogging) {
|
|
15
15
|
taskReporter.ignoreLogMessage('ApplicationInsights:');
|
|
16
16
|
}
|
|
17
17
|
const telemetryClient = await createTelemetryClient({
|
|
18
18
|
productVersion: getVersion(import.meta.url),
|
|
19
|
-
|
|
19
|
+
connectionString,
|
|
20
20
|
logLevel,
|
|
21
21
|
serviceNamespace: 'cloudpack',
|
|
22
22
|
serviceName: 'cli',
|
package/lib/initTelemetry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initTelemetry.js","sourceRoot":"","sources":["../src/initTelemetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAU7F;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAA6B,EAAE,YAA0B;IAC3F,MAAM,
|
|
1
|
+
{"version":3,"file":"initTelemetry.js","sourceRoot":"","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["import { type TelemetryConfig } from '@ms-cloudpack/config';\nimport { getVersion } from '@ms-cloudpack/package-utilities';\nimport { createTelemetryClient } from '@ms-cloudpack/telemetry';\nimport { registerPerformanceObservers } from './performance/registerPerformanceObservers.js';\nimport type { TaskReporter } from '@ms-cloudpack/task-reporter';\n\nexport interface TelemetryInitOptions {\n useDebugLogging: boolean;\n useVerboseLogging: boolean;\n telemetryConfig: TelemetryConfig | undefined;\n sharedSpanAttributes?: Record<string, string>;\n}\n\n/**\n * Initialize the telemetry client, create the root span, register performance observers.\n * Telemetry will not be sent if no instrumentation key is found.\n * @param options - options to initialize telemetry\n * @returns\n */\nexport async function initTelemetry(options: TelemetryInitOptions, taskReporter: TaskReporter) {\n const connectionString =\n options.telemetryConfig?.connectionString || process.env.CLOUDPACK_TELEMETRY_CONNECTION_STRING;\n\n const logLevel = options.useVerboseLogging ? 'VERBOSE' : options.useDebugLogging ? 'DEBUG' : undefined;\n if (!options.useDebugLogging) {\n taskReporter.ignoreLogMessage('ApplicationInsights:');\n }\n\n const telemetryClient = await createTelemetryClient({\n productVersion: getVersion(import.meta.url),\n connectionString,\n logLevel,\n serviceNamespace: 'cloudpack',\n serviceName: 'cli',\n rootSpanName: 'CLI',\n });\n\n if (options.sharedSpanAttributes) {\n for (const [key, value] of Object.entries(options.sharedSpanAttributes)) {\n telemetryClient.setSharedSpanAttribute(key, value);\n }\n }\n\n // Register performance observers to track performance metrics as events of CLI span.\n registerPerformanceObservers(telemetryClient);\n\n return telemetryClient;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"description": "The Cloudpack command line interface - a tool for managing fast inner and outer looping in web apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@lage-run/target-graph": "^0.8.7",
|
|
14
|
-
"@ms-cloudpack/api-server": "^0.21.
|
|
15
|
-
"@ms-cloudpack/config": "^0.
|
|
16
|
-
"@ms-cloudpack/create-express-app": "^1.3.
|
|
17
|
-
"@ms-cloudpack/json-utilities": "^0.0.
|
|
18
|
-
"@ms-cloudpack/overlay": "^0.16.
|
|
19
|
-
"@ms-cloudpack/package-utilities": "^5.1.
|
|
20
|
-
"@ms-cloudpack/path-string-parsing": "^1.1.
|
|
21
|
-
"@ms-cloudpack/path-utilities": "^2.3.
|
|
22
|
-
"@ms-cloudpack/task-reporter": "^0.8.
|
|
23
|
-
"@ms-cloudpack/telemetry": "^0.
|
|
14
|
+
"@ms-cloudpack/api-server": "^0.21.3",
|
|
15
|
+
"@ms-cloudpack/config": "^0.14.0",
|
|
16
|
+
"@ms-cloudpack/create-express-app": "^1.3.12",
|
|
17
|
+
"@ms-cloudpack/json-utilities": "^0.0.8",
|
|
18
|
+
"@ms-cloudpack/overlay": "^0.16.5",
|
|
19
|
+
"@ms-cloudpack/package-utilities": "^5.1.10",
|
|
20
|
+
"@ms-cloudpack/path-string-parsing": "^1.1.1",
|
|
21
|
+
"@ms-cloudpack/path-utilities": "^2.3.5",
|
|
22
|
+
"@ms-cloudpack/task-reporter": "^0.8.2",
|
|
23
|
+
"@ms-cloudpack/telemetry": "^0.4.0",
|
|
24
24
|
"commander": "^11.0.0",
|
|
25
25
|
"cross-spawn": "^7.0.3",
|
|
26
26
|
"fast-glob": "^3.2.12",
|