@adonisjs/otel 1.2.0 → 1.2.1
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 +2 -5
- package/build/configure.d.ts +1 -1
- package/build/src/debug.d.ts +1 -1
- package/build/src/errors.d.ts +2 -2
- package/build/src/errors.js +1 -1
- package/build/src/instrumentations/container.d.ts +1 -1
- package/build/src/instrumentations/events.d.ts +1 -1
- package/build/src/start.js +9 -1
- package/package.json +35 -29
package/README.md
CHANGED
|
@@ -27,12 +27,9 @@ In order to ensure that the AdonisJS community is welcoming to all, please revie
|
|
|
27
27
|
AdonisJS OpenTelemetry is open-sourced software licensed under the [MIT license](LICENSE.md).
|
|
28
28
|
|
|
29
29
|
[gh-workflow-image]: https://img.shields.io/github/actions/workflow/status/adonisjs/otel/checks.yml?style=for-the-badge
|
|
30
|
-
[gh-workflow-url]: https://github.com/adonisjs/otel/actions/workflows/checks.yml
|
|
31
|
-
|
|
30
|
+
[gh-workflow-url]: https://github.com/adonisjs/otel/actions/workflows/checks.yml 'Github action'
|
|
32
31
|
[npm-image]: https://img.shields.io/npm/v/@adonisjs/otel/latest.svg?style=for-the-badge&logo=npm
|
|
33
|
-
[npm-url]: https://www.npmjs.com/package/@adonisjs/otel/v/latest
|
|
34
|
-
|
|
32
|
+
[npm-url]: https://www.npmjs.com/package/@adonisjs/otel/v/latest 'npm'
|
|
35
33
|
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
|
|
36
|
-
|
|
37
34
|
[license-url]: LICENSE.md
|
|
38
35
|
[license-image]: https://img.shields.io/github/license/adonisjs/otel?style=for-the-badge
|
package/build/configure.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import ConfigureCommand from '@adonisjs/core/commands/configure';
|
|
1
|
+
import type ConfigureCommand from '@adonisjs/core/commands/configure';
|
|
2
2
|
export declare function configure(command: ConfigureCommand): Promise<void>;
|
package/build/src/debug.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("util").DebugLogger;
|
|
1
|
+
declare const _default: import("node:util").DebugLogger;
|
|
2
2
|
export default _default;
|
package/build/src/errors.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const E_OTEL_CONFIG: new (args: [configPath: string], options?: ErrorOptions) => import("@poppinss/utils").Exception;
|
|
2
|
-
export declare const E_OTEL_CONFIG_INVALID: new (args: [configPath: string], options?: ErrorOptions) => import("@poppinss/utils").Exception;
|
|
1
|
+
export declare const E_OTEL_CONFIG: new (args: [configPath: string], options?: ErrorOptions) => import("@poppinss/utils/exception").Exception;
|
|
2
|
+
export declare const E_OTEL_CONFIG_INVALID: new (args: [configPath: string], options?: ErrorOptions) => import("@poppinss/utils/exception").Exception;
|
package/build/src/errors.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { createError } from '@poppinss/utils';
|
|
1
|
+
import { createError } from '@poppinss/utils/exception';
|
|
2
2
|
export const E_OTEL_CONFIG = createError('Failed to load OpenTelemetry config at "%s". Make sure the file exists and has no syntax errors.', 'E_OTEL_CONFIG');
|
|
3
3
|
export const E_OTEL_CONFIG_INVALID = createError('OpenTelemetry config at "%s" must export a configuration object.', 'E_OTEL_CONFIG_INVALID');
|
|
@@ -2,7 +2,7 @@ import type { Span } from '@opentelemetry/api';
|
|
|
2
2
|
import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
3
3
|
import type { ContainerMakeTracingData } from '@adonisjs/core/types/container';
|
|
4
4
|
import { InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
5
|
-
import { TracingChannelSubscribers } from 'node:diagnostics_channel';
|
|
5
|
+
import { type TracingChannelSubscribers } from 'node:diagnostics_channel';
|
|
6
6
|
/**
|
|
7
7
|
* OpenTelemetry instrumentation for AdonisJS IoC Container.
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@ import type { Span } from '@opentelemetry/api';
|
|
|
2
2
|
import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
3
3
|
import type { TracingChannelSubscribers } from 'node:diagnostics_channel';
|
|
4
4
|
import { InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
5
|
-
import { AllowedEventTypes, EventDispatchData } from '@adonisjs/core/types/events';
|
|
5
|
+
import { type AllowedEventTypes, type EventDispatchData } from '@adonisjs/core/types/events';
|
|
6
6
|
/**
|
|
7
7
|
* OpenTelemetry instrumentation for AdonisJS Event Emitter.
|
|
8
8
|
*
|
package/build/src/start.js
CHANGED
|
@@ -15,13 +15,21 @@
|
|
|
15
15
|
* import '../otel.js'
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
19
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
20
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
21
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return path;
|
|
25
|
+
};
|
|
18
26
|
import { createAddHookMessageChannel } from 'import-in-the-middle';
|
|
19
27
|
import { register } from 'node:module';
|
|
20
28
|
import { join } from 'node:path';
|
|
21
29
|
import { pathToFileURL } from 'node:url';
|
|
22
30
|
import { E_OTEL_CONFIG, E_OTEL_CONFIG_INVALID } from './errors.js';
|
|
23
31
|
async function loadConfig(path) {
|
|
24
|
-
return await import(pathToFileURL(path).href)
|
|
32
|
+
return await import(__rewriteRelativeImportExtension(pathToFileURL(path).href))
|
|
25
33
|
.then((mod) => mod.default || mod)
|
|
26
34
|
.catch((error) => {
|
|
27
35
|
throw new E_OTEL_CONFIG([path], { cause: error });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonisjs/otel",
|
|
3
3
|
"description": "OpenTelemetry integration for AdonisJS with sensible defaults and zero-config setup",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.6.0"
|
|
7
7
|
},
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"format": "prettier --write .",
|
|
44
44
|
"quick:test": "node --import=./tsnode.esm.js --enable-source-maps bin/test.ts",
|
|
45
45
|
"pretest": "npm run lint",
|
|
46
|
-
"test": "
|
|
46
|
+
"test": "npm run quick:test",
|
|
47
47
|
"prebuild": "npm run lint && npm run clean",
|
|
48
48
|
"build": "tsc",
|
|
49
49
|
"checks": "npm run lint && npm run typecheck && npm run test",
|
|
@@ -67,50 +67,56 @@
|
|
|
67
67
|
"license": "MIT",
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@opentelemetry/api": "^1.9.0",
|
|
70
|
-
"@opentelemetry/auto-instrumentations-node": "^0.
|
|
71
|
-
"@opentelemetry/core": "^2.5.
|
|
72
|
-
"@opentelemetry/exporter-
|
|
73
|
-
"@opentelemetry/exporter-
|
|
74
|
-
"@opentelemetry/
|
|
75
|
-
"@opentelemetry/
|
|
76
|
-
"@opentelemetry/
|
|
77
|
-
"@opentelemetry/
|
|
78
|
-
"@opentelemetry/
|
|
79
|
-
"@opentelemetry/sdk-logs": "^0.211.0",
|
|
80
|
-
"@opentelemetry/sdk-metrics": "^2.5.0",
|
|
81
|
-
"@opentelemetry/sdk-node": "^0.211.0",
|
|
82
|
-
"@opentelemetry/sdk-trace-base": "^2.5.0",
|
|
70
|
+
"@opentelemetry/auto-instrumentations-node": "^0.70.0",
|
|
71
|
+
"@opentelemetry/core": "^2.5.1",
|
|
72
|
+
"@opentelemetry/exporter-metrics-otlp-grpc": "^0.212.0",
|
|
73
|
+
"@opentelemetry/exporter-trace-otlp-grpc": "^0.212.0",
|
|
74
|
+
"@opentelemetry/instrumentation": "^0.212.0",
|
|
75
|
+
"@opentelemetry/resources": "^2.5.1",
|
|
76
|
+
"@opentelemetry/sdk-metrics": "^2.5.1",
|
|
77
|
+
"@opentelemetry/sdk-node": "^0.212.0",
|
|
78
|
+
"@opentelemetry/sdk-trace-base": "^2.5.1",
|
|
83
79
|
"@opentelemetry/semantic-conventions": "^1.39.0",
|
|
84
|
-
"@poppinss/utils": "^
|
|
85
|
-
"import-in-the-middle": "^
|
|
80
|
+
"@poppinss/utils": "^7.0.0",
|
|
81
|
+
"import-in-the-middle": "^3.0.0"
|
|
86
82
|
},
|
|
87
83
|
"devDependencies": {
|
|
88
|
-
"@adonisjs/assembler": "^
|
|
89
|
-
"@adonisjs/auth": "^
|
|
90
|
-
"@adonisjs/core": "^7.0.0
|
|
91
|
-
"@adonisjs/eslint-config": "
|
|
84
|
+
"@adonisjs/assembler": "^8.0.0",
|
|
85
|
+
"@adonisjs/auth": "^10.0.0",
|
|
86
|
+
"@adonisjs/core": "^7.0.0",
|
|
87
|
+
"@adonisjs/eslint-config": "3.0.0",
|
|
92
88
|
"@adonisjs/prettier-config": "^1.4.5",
|
|
93
|
-
"@adonisjs/tsconfig": "^
|
|
89
|
+
"@adonisjs/tsconfig": "^2.0.0",
|
|
94
90
|
"@japa/assert": "^4.2.0",
|
|
95
|
-
"@japa/runner": "^
|
|
91
|
+
"@japa/runner": "^5.3.0",
|
|
96
92
|
"@julr/otel-instrumentation-clickhouse": "^1.0.2",
|
|
97
|
-
"@opentelemetry/context-async-hooks": "^2.5.
|
|
93
|
+
"@opentelemetry/context-async-hooks": "^2.5.1",
|
|
98
94
|
"@release-it/conventional-changelog": "^10.0.5",
|
|
99
|
-
"@sentry/node": "^10.
|
|
100
|
-
"@swc/core": "^1.15.
|
|
101
|
-
"@types/node": "^
|
|
102
|
-
"c8": "^
|
|
95
|
+
"@sentry/node": "^10.40.0",
|
|
96
|
+
"@swc/core": "^1.15.13",
|
|
97
|
+
"@types/node": "^25.3.0",
|
|
98
|
+
"c8": "^11.0.0",
|
|
103
99
|
"copyfiles": "^2.4.1",
|
|
104
100
|
"del-cli": "^7.0.0",
|
|
105
|
-
"eslint": "^
|
|
101
|
+
"eslint": "^10.0.2",
|
|
106
102
|
"prettier": "^3.8.1",
|
|
107
103
|
"release-it": "^19.2.4",
|
|
108
104
|
"ts-node-maintained": "^10.9.6",
|
|
109
105
|
"typescript": "^5.9.3"
|
|
110
106
|
},
|
|
111
107
|
"peerDependencies": {
|
|
108
|
+
"@adonisjs/assembler": "^8.0.0",
|
|
109
|
+
"@adonisjs/auth": "^10.0.0",
|
|
112
110
|
"@adonisjs/core": "^6.2.0 || ^7.0.0 || ^7.0.0-next.27"
|
|
113
111
|
},
|
|
112
|
+
"peerDependenciesMeta": {
|
|
113
|
+
"@adonisjs/assembler": {
|
|
114
|
+
"optional": true
|
|
115
|
+
},
|
|
116
|
+
"@adonisjs/auth": {
|
|
117
|
+
"optional": true
|
|
118
|
+
}
|
|
119
|
+
},
|
|
114
120
|
"publishConfig": {
|
|
115
121
|
"provenance": true,
|
|
116
122
|
"access": "public"
|