@nwire/telemetry-otel 0.8.0 → 0.9.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.
@@ -40,7 +40,7 @@
40
40
  * still-open spans with an `unsubscribed` event.
41
41
  */
42
42
  import type { Runtime, Telemetry } from "@nwire/forge";
43
- import type { OtelTracer } from "./otel-types";
43
+ import type { OtelTracer } from "./otel-types.js";
44
44
  export interface AttachOtelExporterOptions {
45
45
  /** OTel Tracer instance from `trace.getTracer(name, version?)`. */
46
46
  readonly tracer: OtelTracer;
@@ -13,6 +13,6 @@
13
13
  * Pairs cleanly with Vector → GreptimeDB (and any other OTLP backend —
14
14
  * Datadog, Honeycomb, Tempo, Jaeger).
15
15
  */
16
- export { attachOtelExporter, type AttachOtelExporterOptions } from "./exporter";
17
- export type { OtelTracer, OtelSpan, SpanContext, SpanKind, SpanStatusCode } from "./otel-types";
16
+ export { attachOtelExporter, type AttachOtelExporterOptions } from "./exporter.js";
17
+ export type { OtelTracer, OtelSpan, SpanContext, SpanKind, SpanStatusCode } from "./otel-types.js";
18
18
  //# sourceMappingURL=telemetry-otel.d.ts.map
@@ -13,5 +13,5 @@
13
13
  * Pairs cleanly with Vector → GreptimeDB (and any other OTLP backend —
14
14
  * Datadog, Honeycomb, Tempo, Jaeger).
15
15
  */
16
- export { attachOtelExporter } from "./exporter";
16
+ export { attachOtelExporter } from "./exporter.js";
17
17
  //# sourceMappingURL=telemetry-otel.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nwire/telemetry-otel",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "private": false,
5
5
  "description": "OpenTelemetry bridge for the Nwire canonical telemetry stream. Translates every Telemetry record into OTLP spans + events. Plug in any OTEL exporter (Datadog, Honeycomb, Tempo, Vector → GreptimeDB).",
6
6
  "license": "MIT",
@@ -22,16 +22,16 @@
22
22
  "access": "public"
23
23
  },
24
24
  "dependencies": {
25
- "@nwire/forge": "0.8.0"
25
+ "@nwire/forge": "0.9.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "typescript": "^5.6.0",
29
29
  "vitest": "^4.0.18",
30
30
  "zod": "^4.0.0",
31
- "@nwire/messages": "0.8.0"
31
+ "@nwire/messages": "0.8.17"
32
32
  },
33
33
  "scripts": {
34
- "build": "tsc",
34
+ "build": "tsc && node ../../scripts/fix-dist-extensions.mjs dist",
35
35
  "typecheck": "tsc --noEmit"
36
36
  }
37
37
  }
@@ -215,7 +215,10 @@ describe("@nwire/telemetry-otel — depth-5 correlation chain", () => {
215
215
  const causationId = String(span.attributes["nwire.causation_id"]);
216
216
  expect(msgId, `step ${i + 1} must have messageId`).toBeTruthy();
217
217
  expect(causationId, `step ${i + 1} must have causationId`).toBeTruthy();
218
- expect(causationId, `step ${i + 1} causationId must differ from its own messageId`).not.toEqual(msgId);
218
+ expect(
219
+ causationId,
220
+ `step ${i + 1} causationId must differ from its own messageId`,
221
+ ).not.toEqual(msgId);
219
222
  }
220
223
  });
221
224
 
@@ -234,7 +237,10 @@ describe("@nwire/telemetry-otel — depth-5 correlation chain", () => {
234
237
  const actionSpans = spans.filter((s) => /^nwire\.action chain\.step-\d/.test(s.name));
235
238
  for (const s of actionSpans) {
236
239
  const eventPublished = s.events.filter((e) => e.name === "event.published");
237
- expect(eventPublished.length, `${s.name} must record at least one event.published`).toBeGreaterThanOrEqual(1);
240
+ expect(
241
+ eventPublished.length,
242
+ `${s.name} must record at least one event.published`,
243
+ ).toBeGreaterThanOrEqual(1);
238
244
  }
239
245
  });
240
246
  });
@@ -306,14 +312,19 @@ describe.skipIf(!process.env.RUN_INTEGRATION)(
306
312
  const queryResp = await fetch(queryUrl);
307
313
  expect(queryResp.ok).toBe(true);
308
314
  const body = (await queryResp.json()) as {
309
- output: Array<{ records: { rows: unknown[][]; schema: { column_schemas: Array<{ name: string }> } } }>;
315
+ output: Array<{
316
+ records: { rows: unknown[][]; schema: { column_schemas: Array<{ name: string }> } };
317
+ }>;
310
318
  };
311
319
  const rows = body.output?.[0]?.records?.rows ?? [];
312
- expect(rows.length, `expected ${DEPTH} rows for correlation ${rootCorrelationId}`).toBe(DEPTH);
320
+ expect(rows.length, `expected ${DEPTH} rows for correlation ${rootCorrelationId}`).toBe(
321
+ DEPTH,
322
+ );
313
323
 
314
324
  // Every row must carry the root correlation id.
315
- const corrIdx =
316
- body.output[0].records.schema.column_schemas.findIndex((c) => c.name === "correlation_id");
325
+ const corrIdx = body.output[0].records.schema.column_schemas.findIndex(
326
+ (c) => c.name === "correlation_id",
327
+ );
317
328
  for (const row of rows) {
318
329
  expect(row[corrIdx]).toBe(rootCorrelationId);
319
330
  }