@forinda/kickjs-otel 1.5.0 → 1.7.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/dist/index.js +3 -3
- package/dist/otel.adapter.d.ts +2 -2
- package/dist/otel.adapter.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -18,10 +18,10 @@ var a = /* @__PURE__ */ ((t) => typeof require < "u" ? require : typeof Proxy <
|
|
|
18
18
|
...t
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
beforeStart(
|
|
21
|
+
beforeStart({}) {
|
|
22
22
|
try {
|
|
23
|
-
const
|
|
24
|
-
this.options.tracing && (this.tracer =
|
|
23
|
+
const t = a("@opentelemetry/api");
|
|
24
|
+
this.options.tracing && (this.tracer = t.trace.getTracer(this.options.serviceName, this.options.serviceVersion), u.info(`Tracing enabled for ${this.options.serviceName}`)), this.options.metrics && (this.meter = t.metrics.getMeter(this.options.serviceName, this.options.serviceVersion), this.requestCounter = this.meter.createCounter("http.server.request.count", { description: "Total number of HTTP requests" }), this.requestDuration = this.meter.createHistogram("http.server.request.duration", {
|
|
25
25
|
description: "HTTP request duration in milliseconds",
|
|
26
26
|
unit: "ms"
|
|
27
27
|
}), u.info("Metrics enabled — http.server.request.count, http.server.request.duration"));
|
package/dist/otel.adapter.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AppAdapter, type
|
|
1
|
+
import { type AppAdapter, type AdapterContext, type AdapterMiddleware } from '@forinda/kickjs-core';
|
|
2
2
|
import type { OtelAdapterOptions } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* OpenTelemetry adapter for KickJS — automatic tracing and metrics.
|
|
@@ -34,7 +34,7 @@ export declare class OtelAdapter implements AppAdapter {
|
|
|
34
34
|
private requestCounter;
|
|
35
35
|
private requestDuration;
|
|
36
36
|
constructor(options?: OtelAdapterOptions);
|
|
37
|
-
beforeStart(
|
|
37
|
+
beforeStart({}: AdapterContext): void;
|
|
38
38
|
middleware(): AdapterMiddleware[];
|
|
39
39
|
private onFinish;
|
|
40
40
|
private shouldIgnore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otel.adapter.d.ts","sourceRoot":"","sources":["../src/otel.adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,
|
|
1
|
+
{"version":3,"file":"otel.adapter.d.ts","sourceRoot":"","sources":["../src/otel.adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAIjD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,WAAY,YAAW,UAAU;IAC5C,IAAI,SAAgB;IACpB,OAAO,CAAC,OAAO,CAGK;IACpB,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,KAAK,CAAY;IACzB,OAAO,CAAC,cAAc,CAAY;IAClC,OAAO,CAAC,eAAe,CAAY;gBAEvB,OAAO,GAAE,kBAAuB;IAU5C,WAAW,CAAC,EAAE,EAAE,cAAc,GAAG,IAAI;IA+BrC,UAAU,IAAI,iBAAiB,EAAE;IA2CjC,OAAO,CAAC,QAAQ;IAgChB,OAAO,CAAC,YAAY;IAUd,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAGhC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forinda/kickjs-otel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "OpenTelemetry adapter for KickJS — automatic tracing, metrics, and export to any OTel backend",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kickjs",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"reflect-metadata": "^0.2.2",
|
|
56
|
-
"@forinda/kickjs-core": "1.
|
|
57
|
-
"@forinda/kickjs-http": "1.
|
|
56
|
+
"@forinda/kickjs-core": "1.7.0",
|
|
57
|
+
"@forinda/kickjs-http": "1.7.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@opentelemetry/api": ">=1.4.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@opentelemetry/sdk-trace-base": "^2.6.1",
|
|
80
80
|
"@opentelemetry/sdk-metrics": "^2.6.1",
|
|
81
81
|
"@opentelemetry/semantic-conventions": "^1.4.0",
|
|
82
|
-
"@types/node": "^
|
|
82
|
+
"@types/node": "^25.0.0",
|
|
83
83
|
"typescript": "^5.9.2"
|
|
84
84
|
},
|
|
85
85
|
"publishConfig": {
|