@carecard/telemetry 3.25.0 → 3.27.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/README.md CHANGED
@@ -128,6 +128,8 @@ names, form data, or other application values to spans.
128
128
  ## Public API
129
129
 
130
130
  - `initializeServiceTelemetry({ serviceName, serviceVersion })`
131
+ accepts CareCard `app-*` and `ms-*` runtime identities, including
132
+ `app-auth` and `app-dashboard`.
131
133
  - `createTelemetryShutdown({ telemetryRuntime, shutdownResources })`
132
134
  - `captureActiveTraceparent()`
133
135
  - `runWithTraceparent({ spanName, traceparent }, operation)`
package/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export interface TelemetryRuntime {
4
4
  }
5
5
 
6
6
  export interface ServiceTelemetryOptions {
7
- serviceName: 'app-dashboard' | `ms-${string}`;
7
+ serviceName: `app-${string}` | `ms-${string}`;
8
8
  serviceVersion: string;
9
9
  }
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carecard/telemetry",
3
- "version": "3.25.0",
3
+ "version": "3.27.0",
4
4
  "description": "Privacy-safe OpenTelemetry tracing for CareCard Node.js services",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -15,8 +15,9 @@ const { createTraceparentOnlyPropagator } = require('./traceparentOnlyPropagator
15
15
  let activeRuntime;
16
16
  const installedShutdownHandlers = new WeakSet();
17
17
 
18
+ // Pattern: Boundary Validation - accepts only CareCard service and server-application identities.
18
19
  function validateServiceIdentity({ serviceName, serviceVersion }) {
19
- const namePattern = /^(?:ms-[a-z0-9-]+|app-dashboard)$/;
20
+ const namePattern = /^(?:app|ms)-[a-z0-9-]+$/;
20
21
  const versionPattern = /^\d+\.\d+\.\d+(?:-[a-z0-9.-]+)?$/;
21
22
  if (!namePattern.test(serviceName)) {
22
23
  throw new Error('serviceName must identify a CareCard server application');