@arcote.tech/arc-otel 0.7.19 → 0.7.20

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/dist/index.js CHANGED
@@ -86,6 +86,7 @@ class ArcTelemetry {
86
86
  meter = null;
87
87
  histograms = new Map;
88
88
  counters = new Map;
89
+ upDownCounters = new Map;
89
90
  constructor(config) {
90
91
  const mode = config.mode ?? "development";
91
92
  const enabled = config.enabled ?? mode !== "disabled";
@@ -197,6 +198,18 @@ class ArcTelemetry {
197
198
  counter.add(value, attrs);
198
199
  } catch {}
199
200
  }
201
+ addUpDown(name, delta, attrs = {}) {
202
+ if (!this.active || !this.meter)
203
+ return;
204
+ let counter = this.upDownCounters.get(name);
205
+ if (!counter) {
206
+ counter = this.meter.createUpDownCounter(name);
207
+ this.upDownCounters.set(name, counter);
208
+ }
209
+ try {
210
+ counter.add(delta, attrs);
211
+ } catch {}
212
+ }
200
213
  recordHistogram(name, value, attrs = {}) {
201
214
  if (!this.active || !this.meter)
202
215
  return;
@@ -280,53 +293,31 @@ function getActiveSpan() {
280
293
  function wrapDbAdapter(adapter, telemetry, dbSystem) {
281
294
  if (!telemetry || !telemetry.active)
282
295
  return adapter;
296
+ const dbAttrs = (operation, store) => ({
297
+ "db.system": dbSystem,
298
+ "db.operation.name": operation,
299
+ ...store ? { "db.collection.name": store } : {}
300
+ });
301
+ const measureOp = async (operation, store, fn) => {
302
+ const start = Date.now();
303
+ try {
304
+ return await fn();
305
+ } finally {
306
+ telemetry.measureSince("arc.db.operation.duration", start, dbAttrs(operation, store));
307
+ }
308
+ };
283
309
  const wrapRead = (tx) => ({
284
- find: async (store, options) => telemetry.startSpan(`db.find ${store}`, async (span) => {
285
- const start = Date.now();
286
- try {
287
- const rows = await tx.find(store, options);
288
- span.setAttribute("db.response.row_count", rows.length);
289
- return rows;
290
- } finally {
291
- telemetry.measureSince("arc.db.find_ms", start, {
292
- "db.system": dbSystem,
293
- "db.collection.name": store
294
- });
295
- }
296
- }, {
297
- kind: 3,
298
- attributes: {
299
- "db.system": dbSystem,
300
- "db.operation.name": "find",
301
- "db.collection.name": store
302
- }
303
- })
310
+ find: async (store, options) => telemetry.startSpan(`db.find ${store}`, async (span) => measureOp("find", store, async () => {
311
+ const rows = await tx.find(store, options);
312
+ span.setAttribute("db.response.row_count", rows.length);
313
+ return rows;
314
+ }), { kind: 3, attributes: dbAttrs("find", store) })
304
315
  });
305
316
  const wrapReadWrite = (tx) => ({
306
317
  ...wrapRead(tx),
307
- set: async (store, data) => telemetry.startSpan(`db.set ${store}`, () => tx.set(store, data), {
308
- kind: 3,
309
- attributes: {
310
- "db.system": dbSystem,
311
- "db.operation.name": "set",
312
- "db.collection.name": store
313
- }
314
- }),
315
- remove: async (store, id) => telemetry.startSpan(`db.remove ${store}`, () => tx.remove(store, id), {
316
- kind: 3,
317
- attributes: {
318
- "db.system": dbSystem,
319
- "db.operation.name": "remove",
320
- "db.collection.name": store
321
- }
322
- }),
323
- commit: async () => telemetry.startSpan("db.commit", () => tx.commit(), {
324
- kind: 3,
325
- attributes: {
326
- "db.system": dbSystem,
327
- "db.operation.name": "commit"
328
- }
329
- })
318
+ set: async (store, data) => telemetry.startSpan(`db.set ${store}`, () => measureOp("set", store, () => tx.set(store, data)), { kind: 3, attributes: dbAttrs("set", store) }),
319
+ remove: async (store, id) => telemetry.startSpan(`db.remove ${store}`, () => measureOp("remove", store, () => tx.remove(store, id)), { kind: 3, attributes: dbAttrs("remove", store) }),
320
+ commit: async () => telemetry.startSpan("db.commit", () => measureOp("commit", undefined, () => tx.commit()), { kind: 3, attributes: dbAttrs("commit") })
330
321
  });
331
322
  return new Proxy(adapter, {
332
323
  get(target, prop) {
@@ -102,6 +102,7 @@ class ArcTelemetry {
102
102
  meter = null;
103
103
  histograms = new Map;
104
104
  counters = new Map;
105
+ upDownCounters = new Map;
105
106
  constructor(config) {
106
107
  const mode = config.mode ?? "development";
107
108
  const enabled = config.enabled ?? mode !== "disabled";
@@ -213,6 +214,18 @@ class ArcTelemetry {
213
214
  counter.add(value, attrs);
214
215
  } catch {}
215
216
  }
217
+ addUpDown(name, delta, attrs = {}) {
218
+ if (!this.active || !this.meter)
219
+ return;
220
+ let counter = this.upDownCounters.get(name);
221
+ if (!counter) {
222
+ counter = this.meter.createUpDownCounter(name);
223
+ this.upDownCounters.set(name, counter);
224
+ }
225
+ try {
226
+ counter.add(delta, attrs);
227
+ } catch {}
228
+ }
216
229
  recordHistogram(name, value, attrs = {}) {
217
230
  if (!this.active || !this.meter)
218
231
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"init-server.d.ts","sourceRoot":"","sources":["../src/init-server.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAKjE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAUlD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,YAAY,CAAC;IACxB,mFAAmF;IACnF,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,eAAe,GAAG,gBAAgB,CAuG7E"}
1
+ {"version":3,"file":"init-server.d.ts","sourceRoot":"","sources":["../src/init-server.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAKjE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAUlD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,YAAY,CAAC;IACxB,mFAAmF;IACnF,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,eAAe,GAAG,gBAAgB,CA8G7E"}
@@ -24,6 +24,53 @@ import {
24
24
  ATTR_SERVICE_VERSION
25
25
  } from "@opentelemetry/semantic-conventions/incubating";
26
26
 
27
+ // src/patch-console.ts
28
+ import { format } from "node:util";
29
+ var METHODS = [
30
+ ["debug", "debug"],
31
+ ["log", "info"],
32
+ ["info", "info"],
33
+ ["warn", "warn"],
34
+ ["error", "error"]
35
+ ];
36
+ var patched = false;
37
+ var emitting = false;
38
+ function patchConsole(telemetry) {
39
+ if (patched || !telemetry.active)
40
+ return () => {};
41
+ patched = true;
42
+ const originals = [];
43
+ for (const [method, level] of METHODS) {
44
+ const original = console[method].bind(console);
45
+ originals.push([method, original]);
46
+ console[method] = (...args) => {
47
+ original(...args);
48
+ if (emitting)
49
+ return;
50
+ emitting = true;
51
+ try {
52
+ const body = format(...args);
53
+ if (body.startsWith("[arc-otel]"))
54
+ return;
55
+ const error = args.find((arg) => arg instanceof Error);
56
+ telemetry.log(level, body, error ? {
57
+ "exception.type": error.name,
58
+ "exception.message": error.message,
59
+ "exception.stacktrace": error.stack ?? ""
60
+ } : {});
61
+ } catch {} finally {
62
+ emitting = false;
63
+ }
64
+ };
65
+ }
66
+ return () => {
67
+ for (const [method, original] of originals) {
68
+ console[method] = original;
69
+ }
70
+ patched = false;
71
+ };
72
+ }
73
+
27
74
  // src/telemetry.ts
28
75
  import {
29
76
  context,
@@ -112,6 +159,7 @@ class ArcTelemetry {
112
159
  meter = null;
113
160
  histograms = new Map;
114
161
  counters = new Map;
162
+ upDownCounters = new Map;
115
163
  constructor(config) {
116
164
  const mode = config.mode ?? "development";
117
165
  const enabled = config.enabled ?? mode !== "disabled";
@@ -223,6 +271,18 @@ class ArcTelemetry {
223
271
  counter.add(value, attrs);
224
272
  } catch {}
225
273
  }
274
+ addUpDown(name, delta, attrs = {}) {
275
+ if (!this.active || !this.meter)
276
+ return;
277
+ let counter = this.upDownCounters.get(name);
278
+ if (!counter) {
279
+ counter = this.meter.createUpDownCounter(name);
280
+ this.upDownCounters.set(name, counter);
281
+ }
282
+ try {
283
+ counter.add(delta, attrs);
284
+ } catch {}
285
+ }
226
286
  recordHistogram(name, value, attrs = {}) {
227
287
  if (!this.active || !this.meter)
228
288
  return;
@@ -272,53 +332,31 @@ function noopSpan() {
272
332
  function wrapDbAdapter(adapter, telemetry, dbSystem) {
273
333
  if (!telemetry || !telemetry.active)
274
334
  return adapter;
335
+ const dbAttrs = (operation, store) => ({
336
+ "db.system": dbSystem,
337
+ "db.operation.name": operation,
338
+ ...store ? { "db.collection.name": store } : {}
339
+ });
340
+ const measureOp = async (operation, store, fn) => {
341
+ const start = Date.now();
342
+ try {
343
+ return await fn();
344
+ } finally {
345
+ telemetry.measureSince("arc.db.operation.duration", start, dbAttrs(operation, store));
346
+ }
347
+ };
275
348
  const wrapRead = (tx) => ({
276
- find: async (store, options) => telemetry.startSpan(`db.find ${store}`, async (span) => {
277
- const start = Date.now();
278
- try {
279
- const rows = await tx.find(store, options);
280
- span.setAttribute("db.response.row_count", rows.length);
281
- return rows;
282
- } finally {
283
- telemetry.measureSince("arc.db.find_ms", start, {
284
- "db.system": dbSystem,
285
- "db.collection.name": store
286
- });
287
- }
288
- }, {
289
- kind: 3,
290
- attributes: {
291
- "db.system": dbSystem,
292
- "db.operation.name": "find",
293
- "db.collection.name": store
294
- }
295
- })
349
+ find: async (store, options) => telemetry.startSpan(`db.find ${store}`, async (span) => measureOp("find", store, async () => {
350
+ const rows = await tx.find(store, options);
351
+ span.setAttribute("db.response.row_count", rows.length);
352
+ return rows;
353
+ }), { kind: 3, attributes: dbAttrs("find", store) })
296
354
  });
297
355
  const wrapReadWrite = (tx) => ({
298
356
  ...wrapRead(tx),
299
- set: async (store, data) => telemetry.startSpan(`db.set ${store}`, () => tx.set(store, data), {
300
- kind: 3,
301
- attributes: {
302
- "db.system": dbSystem,
303
- "db.operation.name": "set",
304
- "db.collection.name": store
305
- }
306
- }),
307
- remove: async (store, id) => telemetry.startSpan(`db.remove ${store}`, () => tx.remove(store, id), {
308
- kind: 3,
309
- attributes: {
310
- "db.system": dbSystem,
311
- "db.operation.name": "remove",
312
- "db.collection.name": store
313
- }
314
- }),
315
- commit: async () => telemetry.startSpan("db.commit", () => tx.commit(), {
316
- kind: 3,
317
- attributes: {
318
- "db.system": dbSystem,
319
- "db.operation.name": "commit"
320
- }
321
- })
357
+ set: async (store, data) => telemetry.startSpan(`db.set ${store}`, () => measureOp("set", store, () => tx.set(store, data)), { kind: 3, attributes: dbAttrs("set", store) }),
358
+ remove: async (store, id) => telemetry.startSpan(`db.remove ${store}`, () => measureOp("remove", store, () => tx.remove(store, id)), { kind: 3, attributes: dbAttrs("remove", store) }),
359
+ commit: async () => telemetry.startSpan("db.commit", () => measureOp("commit", undefined, () => tx.commit()), { kind: 3, attributes: dbAttrs("commit") })
322
360
  });
323
361
  return new Proxy(adapter, {
324
362
  get(target, prop) {
@@ -383,6 +421,7 @@ function initServerTelemetry(config) {
383
421
  logger: loggerProvider.getLogger(config.serviceName),
384
422
  meter: meterProvider.getMeter(config.serviceName)
385
423
  });
424
+ const restoreConsole = config.patchConsole !== false ? patchConsole(telemetry) : () => {};
386
425
  if (telemetry.config.debug) {
387
426
  console.log("[arc-otel] server init", {
388
427
  serviceName: config.serviceName,
@@ -393,6 +432,7 @@ function initServerTelemetry(config) {
393
432
  });
394
433
  }
395
434
  const shutdown = async () => {
435
+ restoreConsole();
396
436
  try {
397
437
  await Promise.all([
398
438
  tracerProvider.shutdown(),
@@ -0,0 +1,8 @@
1
+ import type { ArcTelemetry } from "./telemetry";
2
+ /**
3
+ * Patch global console so app logs flow to the OTLP logs pipeline. Returns
4
+ * a restore function (used by `initServerTelemetry`'s shutdown). Calling it
5
+ * twice is a no-op — the second call returns a noop restore.
6
+ */
7
+ export declare function patchConsole(telemetry: ArcTelemetry): () => void;
8
+ //# sourceMappingURL=patch-console.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patch-console.d.ts","sourceRoot":"","sources":["../src/patch-console.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAmChD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,YAAY,GAAG,MAAM,IAAI,CA2ChE"}
@@ -25,6 +25,10 @@ export interface TelemetryConfig {
25
25
  debug?: boolean;
26
26
  /** Override sanitization defaults (regex / size caps). */
27
27
  sanitize?: SanitizeOptions;
28
+ /** Server-only: bridge console.* to the OTLP logs pipeline (stdout output
29
+ * is untouched — the original method always runs first). Default true.
30
+ * Runtime kill-switch: `ARC_OTEL_PATCH_CONSOLE=false` (wired in the CLI). */
31
+ patchConsole?: boolean;
28
32
  }
29
33
  /** Span options. Same shape as OTel's but with optional Arc-friendly defaults. */
30
34
  export interface SpanOptions {
@@ -41,6 +45,7 @@ export declare class ArcTelemetry {
41
45
  private meter;
42
46
  private histograms;
43
47
  private counters;
48
+ private upDownCounters;
44
49
  constructor(config: TelemetryConfig);
45
50
  /** Called by init-server / init-browser after the SDK provider is wired. */
46
51
  attach(opts: {
@@ -90,6 +95,9 @@ export declare class ArcTelemetry {
90
95
  log(level: "debug" | "info" | "warn" | "error", body: string, attrs?: Record<string, unknown>, unsafeAttrs?: boolean): void;
91
96
  /** Increment a counter by `value` (default 1). Counter is created on first use. */
92
97
  incrementCounter(name: string, value?: number, attrs?: Attributes): void;
98
+ /** Add a (possibly negative) delta to an up-down counter — e.g. active
99
+ * WebSocket connections. Created lazily on first use. */
100
+ addUpDown(name: string, delta: number, attrs?: Attributes): void;
93
101
  /** Record a value into a histogram (e.g. latency ms). Created lazily. */
94
102
  recordHistogram(name: string, value: number, attrs?: Attributes): void;
95
103
  /** Convenience: record `Date.now() - start` into a histogram. */
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EAGR,KAAK,UAAU,EAEf,KAAK,IAAI,EACT,KAAK,MAAM,EACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,KAAK,MAAM,EAEZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,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@ -1 +1 @@
1
- {"version":3,"file":"wrap-db-adapter.d.ts","sourceRoot":"","sources":["../src/wrap-db-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAqBhD,UAAU,UAAU;IAClB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CAC3D;AACD,UAAU,eAAgB,SAAQ,UAAU;IAC1C,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AACD,UAAU,WAAW;IACnB,oBAAoB,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,eAAe,CAAC;IACzD,eAAe,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;IAC/C,mBAAmB,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,WAAW,EACjD,OAAO,EAAE,CAAC,EACV,SAAS,EAAE,YAAY,GAAG,SAAS,EACnC,QAAQ,EAAE,YAAY,GAAG,QAAQ,GAChC,CAAC,CAqFH"}
1
+ {"version":3,"file":"wrap-db-adapter.d.ts","sourceRoot":"","sources":["../src/wrap-db-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAqBhD,UAAU,UAAU;IAClB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CAC3D;AACD,UAAU,eAAgB,SAAQ,UAAU;IAC1C,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AACD,UAAU,WAAW;IACnB,oBAAoB,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,eAAe,CAAC;IACzD,eAAe,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;IAC/C,mBAAmB,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,WAAW,EACjD,OAAO,EAAE,CAAC,EACV,SAAS,EAAE,YAAY,GAAG,SAAS,EACnC,QAAQ,EAAE,YAAY,GAAG,QAAQ,GAChC,CAAC,CA6EH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcote.tech/arc-otel",
3
- "version": "0.7.19",
3
+ "version": "0.7.20",
4
4
  "description": "OpenTelemetry instrumentation primitives for the Arc framework — server + browser SDK init, span helpers, PII-safe attribute sanitization, W3C Trace Context propagation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -43,7 +43,7 @@
43
43
  "@opentelemetry/semantic-conventions": "^1.27.0"
44
44
  },
45
45
  "peerDependencies": {
46
- "@arcote.tech/arc": "^0.7.19"
46
+ "@arcote.tech/arc": "^0.7.20"
47
47
  },
48
48
  "devDependencies": {
49
49
  "typescript": "^5.0.0"