@ms-cloudpack/api-server 0.20.2 → 0.20.3

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.
@@ -8,7 +8,7 @@ export function reportMetric(params) {
8
8
  const { input, ctx } = params;
9
9
  const { metric, value } = input;
10
10
  const { telemetryClient } = ctx;
11
- telemetryClient.rootSpan.addEvent(metric, value);
11
+ telemetryClient.performance.record({ name: metric, value });
12
12
  }
13
13
  // Attach a trpc procedure to the function.
14
14
  reportMetric.procedure = publicProcedure.input(ZodReportMetricInput).mutation(reportMetric);
@@ -1 +1 @@
1
- {"version":3,"file":"reportMetric.js","sourceRoot":"","sources":["../../src/apis/reportMetric.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAIH,MAAM,UAAU,YAAY,CAAC,MAAuD;IAClF,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IAC9B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAChC,MAAM,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAEhC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACnD,CAAC;AAED,2CAA2C;AAC3C,YAAY,CAAC,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import { publicProcedure } from '../trpc/common.js';\nimport { z } from 'zod';\nimport type { ApiParams } from '../types/ApiParams.js';\n\nconst ZodReportMetricInput = z.object({\n metric: z.string(),\n value: z.number(),\n});\n\nexport type ReportMetricInput = z.infer<typeof ZodReportMetricInput>;\n\nexport function reportMetric(params: ApiParams<ReportMetricInput, 'telemetryClient'>): void {\n const { input, ctx } = params;\n const { metric, value } = input;\n const { telemetryClient } = ctx;\n\n telemetryClient.rootSpan.addEvent(metric, value);\n}\n\n// Attach a trpc procedure to the function.\nreportMetric.procedure = publicProcedure.input(ZodReportMetricInput).mutation(reportMetric);\n"]}
1
+ {"version":3,"file":"reportMetric.js","sourceRoot":"","sources":["../../src/apis/reportMetric.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAIH,MAAM,UAAU,YAAY,CAAC,MAAuD;IAClF,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;IAC9B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAChC,MAAM,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAEhC,eAAe,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAC9D,CAAC;AAED,2CAA2C;AAC3C,YAAY,CAAC,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import { publicProcedure } from '../trpc/common.js';\nimport { z } from 'zod';\nimport type { ApiParams } from '../types/ApiParams.js';\n\nconst ZodReportMetricInput = z.object({\n metric: z.string(),\n value: z.number(),\n});\n\nexport type ReportMetricInput = z.infer<typeof ZodReportMetricInput>;\n\nexport function reportMetric(params: ApiParams<ReportMetricInput, 'telemetryClient'>): void {\n const { input, ctx } = params;\n const { metric, value } = input;\n const { telemetryClient } = ctx;\n\n telemetryClient.performance.record({ name: metric, value });\n}\n\n// Attach a trpc procedure to the function.\nreportMetric.procedure = publicProcedure.input(ZodReportMetricInput).mutation(reportMetric);\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/api-server",
3
- "version": "0.20.2",
3
+ "version": "0.20.3",
4
4
  "description": "An implementation of the API server that does interacts with a task scheduler.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,7 +36,7 @@
36
36
  "@ms-cloudpack/path-string-parsing": "^1.1.0",
37
37
  "@ms-cloudpack/path-utilities": "^2.3.4",
38
38
  "@ms-cloudpack/task-reporter": "^0.8.1",
39
- "@ms-cloudpack/telemetry": "^0.3.8",
39
+ "@ms-cloudpack/telemetry": "^0.3.9",
40
40
  "@ms-cloudpack/remote-cache": "^0.1.10",
41
41
  "@trpc/client": "^10.38.1",
42
42
  "@trpc/server": "^10.38.1",