@arcote.tech/arc-otel 0.7.8 → 0.7.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"init-server.d.ts","sourceRoot":"","sources":["../src/init-server.ts"],"names":[],"mappings":"AAuBA,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,CA8F7E"}
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,4 +1,5 @@
1
1
  // src/init-server.ts
2
+ import { diag, DiagConsoleLogger, DiagLogLevel } from "@opentelemetry/api";
2
3
  import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http";
3
4
  import { OTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-http";
4
5
  import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
@@ -336,6 +337,9 @@ function wrapDbAdapter(adapter, telemetry, dbSystem) {
336
337
  // src/init-server.ts
337
338
  function initServerTelemetry(config) {
338
339
  const telemetry = new ArcTelemetry({ ...config, environment: "server" });
340
+ if (telemetry.config.debug) {
341
+ diag.setLogger(new DiagConsoleLogger, DiagLogLevel.ALL);
342
+ }
339
343
  if (!telemetry.config.enabled) {
340
344
  return { telemetry, shutdown: async () => {} };
341
345
  }
@@ -384,7 +388,8 @@ function initServerTelemetry(config) {
384
388
  serviceName: config.serviceName,
385
389
  endpoint,
386
390
  sampleRate: telemetry.config.sampleRate,
387
- mode: telemetry.config.mode
391
+ mode: telemetry.config.mode,
392
+ active: telemetry.active
388
393
  });
389
394
  }
390
395
  const shutdown = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcote.tech/arc-otel",
3
- "version": "0.7.8",
3
+ "version": "0.7.9",
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.8"
46
+ "@arcote.tech/arc": "^0.7.9"
47
47
  },
48
48
  "devDependencies": {
49
49
  "typescript": "^5.0.0"