@opentelemetry/instrumentation-http 0.222.0 → 0.300.0-development.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 +0 -2
- package/dist/_virtual/_rolldown/runtime.mjs +5 -0
- package/dist/http.cjs +425 -0
- package/dist/http.cjs.map +1 -0
- package/dist/http.d.cts +61 -0
- package/dist/http.d.cts.map +1 -0
- package/dist/http.d.mts +61 -0
- package/dist/http.d.mts.map +1 -0
- package/dist/http.mjs +425 -0
- package/dist/http.mjs.map +1 -0
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +2 -0
- package/dist/internal-types.cjs +32 -0
- package/dist/internal-types.cjs.map +1 -0
- package/dist/internal-types.mjs +29 -0
- package/dist/internal-types.mjs.map +1 -0
- package/dist/semconv.cjs +18 -0
- package/dist/semconv.cjs.map +1 -0
- package/dist/semconv.mjs +17 -0
- package/dist/semconv.mjs.map +1 -0
- package/dist/types.d.cts +112 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +112 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/utils.cjs +486 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.mjs +471 -0
- package/dist/utils.mjs.map +1 -0
- package/dist/version.cjs +6 -0
- package/dist/version.cjs.map +1 -0
- package/dist/version.mjs +6 -0
- package/dist/version.mjs.map +1 -0
- package/package.json +35 -25
- package/build/src/http.d.ts +0 -61
- package/build/src/http.js +0 -562
- package/build/src/http.js.map +0 -1
- package/build/src/index.d.ts +0 -3
- package/build/src/index.js +0 -10
- package/build/src/index.js.map +0 -1
- package/build/src/internal-types.d.ts +0 -42
- package/build/src/internal-types.js +0 -32
- package/build/src/internal-types.js.map +0 -1
- package/build/src/semconv.d.ts +0 -17
- package/build/src/semconv.js +0 -29
- package/build/src/semconv.js.map +0 -1
- package/build/src/types.d.ts +0 -115
- package/build/src/types.js +0 -3
- package/build/src/types.js.map +0 -1
- package/build/src/utils.d.ts +0 -105
- package/build/src/utils.js +0 -655
- package/build/src/utils.js.map +0 -1
- package/build/src/version.d.ts +0 -2
- package/build/src/version.js +0 -10
- package/build/src/version.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,26 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/instrumentation-http",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.300.0-development.1",
|
|
4
4
|
"description": "OpenTelemetry instrumentation for `node:http` and `node:https` http client and server modules",
|
|
5
|
-
"main": "
|
|
6
|
-
"types": "
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"types": "./dist/index.d.cts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"require": {
|
|
10
|
+
"types": "./dist/index.d.cts",
|
|
11
|
+
"default": "./dist/index.cjs"
|
|
12
|
+
},
|
|
13
|
+
"default": {
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"default": "./dist/index.mjs"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
7
19
|
"repository": "open-telemetry/opentelemetry-js",
|
|
8
20
|
"scripts": {
|
|
9
21
|
"prepublishOnly": "npm run compile",
|
|
10
|
-
"compile": "
|
|
11
|
-
"clean": "
|
|
22
|
+
"compile": "tsdown && tsdown -c tsdown.test.config.ts",
|
|
23
|
+
"clean": "rimraf dist build",
|
|
12
24
|
"test:cjs": "nyc --silent mocha test/**/*.test.ts",
|
|
13
|
-
"test:esm": "nyc --silent --no-clean node --experimental-loader=@opentelemetry/instrumentation/hook.mjs ../../../
|
|
14
|
-
"test:double-instr": "nyc --silent --no-clean node --experimental-loader=@opentelemetry/instrumentation/hook.mjs ../../../
|
|
25
|
+
"test:esm": "nyc --silent --no-clean node --experimental-loader=@opentelemetry/instrumentation/hook.mjs ../../../scripts/run-mocha.mjs 'test/**/*.test.mjs'",
|
|
26
|
+
"test:double-instr": "nyc --silent --no-clean node --experimental-loader=@opentelemetry/instrumentation/hook.mjs ../../../scripts/run-mocha.mjs 'test/integrations/double-instr.test.cjs'",
|
|
15
27
|
"test": "npm run test:cjs && npm run test:esm && npm run test:double-instr && nyc report",
|
|
16
28
|
"tdd": "npm run test -- --watch-extensions ts --watch",
|
|
17
29
|
"lint": "eslint .",
|
|
18
30
|
"lint:fix": "eslint . --fix",
|
|
19
31
|
"version": "node ../../../scripts/version-update.js",
|
|
20
|
-
"watch": "
|
|
32
|
+
"watch": "tsdown --watch --no-clean",
|
|
21
33
|
"prewatch": "node ../../../scripts/version-update.js",
|
|
22
|
-
"peer-api-check": "node ../../../scripts/peer-api-check.
|
|
23
|
-
"align-api-deps": "node ../../../scripts/align-api-deps.
|
|
34
|
+
"peer-api-check": "node ../../../scripts/peer-api-check.mjs",
|
|
35
|
+
"align-api-deps": "node ../../../scripts/align-api-deps.mjs",
|
|
24
36
|
"maint:regenerate-test-certs": "cd test/fixtures && ./regenerate.sh"
|
|
25
37
|
},
|
|
26
38
|
"keywords": [
|
|
@@ -34,47 +46,45 @@
|
|
|
34
46
|
"author": "OpenTelemetry Authors",
|
|
35
47
|
"license": "Apache-2.0",
|
|
36
48
|
"engines": {
|
|
37
|
-
"node": "
|
|
49
|
+
"node": ">=22.15.0"
|
|
38
50
|
},
|
|
39
51
|
"files": [
|
|
40
|
-
"build/src/**/*.js",
|
|
41
|
-
"build/src/**/*.js.map",
|
|
42
|
-
"build/src/**/*.d.ts",
|
|
43
52
|
"doc",
|
|
44
53
|
"LICENSE",
|
|
45
|
-
"README.md"
|
|
54
|
+
"README.md",
|
|
55
|
+
"dist"
|
|
46
56
|
],
|
|
47
57
|
"publishConfig": {
|
|
48
58
|
"access": "public"
|
|
49
59
|
},
|
|
50
60
|
"devDependencies": {
|
|
51
|
-
"@opentelemetry/api": "1.
|
|
52
|
-
"@opentelemetry/context-async-hooks": "
|
|
53
|
-
"@opentelemetry/sdk-metrics": "
|
|
54
|
-
"@opentelemetry/sdk-trace": "
|
|
61
|
+
"@opentelemetry/api": "1.10.0-development.1",
|
|
62
|
+
"@opentelemetry/context-async-hooks": "3.0.0-development.1",
|
|
63
|
+
"@opentelemetry/sdk-metrics": "3.0.0-development.1",
|
|
64
|
+
"@opentelemetry/sdk-trace": "3.0.0-development.1",
|
|
55
65
|
"@types/mocha": "10.0.10",
|
|
56
66
|
"@types/node": "18.19.130",
|
|
57
67
|
"@types/request-promise-native": "1.0.21",
|
|
58
68
|
"@types/sinon": "17.0.4",
|
|
59
69
|
"@types/superagent": "8.1.11",
|
|
60
|
-
"axios": "1.
|
|
70
|
+
"axios": "1.20.0",
|
|
61
71
|
"mocha": "11.8.0",
|
|
62
72
|
"nock": "13.5.6",
|
|
63
|
-
"nyc": "
|
|
73
|
+
"nyc": "18.0.0",
|
|
64
74
|
"sinon": "18.0.1",
|
|
65
75
|
"superagent": "10.3.0",
|
|
66
76
|
"typescript": "5.2.2"
|
|
67
77
|
},
|
|
68
78
|
"peerDependencies": {
|
|
69
|
-
"@opentelemetry/api": "^1.3.0"
|
|
79
|
+
"@opentelemetry/api": "^1.3.0 || 1.10.0-development.1"
|
|
70
80
|
},
|
|
71
81
|
"dependencies": {
|
|
72
|
-
"@opentelemetry/core": "
|
|
73
|
-
"@opentelemetry/instrumentation": "0.
|
|
82
|
+
"@opentelemetry/core": "3.0.0-development.1",
|
|
83
|
+
"@opentelemetry/instrumentation": "0.300.0-development.1",
|
|
74
84
|
"@opentelemetry/semantic-conventions": "^1.29.0",
|
|
75
85
|
"forwarded-parse": "2.1.2"
|
|
76
86
|
},
|
|
77
87
|
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-http",
|
|
78
88
|
"sideEffects": false,
|
|
79
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "83d76963961161511591d5585407d23b5f035a37"
|
|
80
90
|
}
|
package/build/src/http.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { HttpInstrumentationConfig } from './types';
|
|
2
|
-
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
3
|
-
/**
|
|
4
|
-
* `node:http` and `node:https` instrumentation for OpenTelemetry
|
|
5
|
-
*/
|
|
6
|
-
export declare class HttpInstrumentation extends InstrumentationBase<HttpInstrumentationConfig> {
|
|
7
|
-
/** keep track on spans not ended */
|
|
8
|
-
private readonly _spanNotEnded;
|
|
9
|
-
private _headerCapture;
|
|
10
|
-
private _httpPatched;
|
|
11
|
-
private _httpsPatched;
|
|
12
|
-
private _httpServerDurationHistogram;
|
|
13
|
-
private _httpClientDurationHistogram;
|
|
14
|
-
constructor(config?: HttpInstrumentationConfig);
|
|
15
|
-
protected _updateMetricInstruments(): void;
|
|
16
|
-
private _recordServerDuration;
|
|
17
|
-
private _recordClientDuration;
|
|
18
|
-
setConfig(config?: HttpInstrumentationConfig): void;
|
|
19
|
-
init(): [
|
|
20
|
-
InstrumentationNodeModuleDefinition,
|
|
21
|
-
InstrumentationNodeModuleDefinition
|
|
22
|
-
];
|
|
23
|
-
private _getHttpInstrumentation;
|
|
24
|
-
private _getHttpsInstrumentation;
|
|
25
|
-
/**
|
|
26
|
-
* Creates spans for incoming requests, restoring spans' context if applied.
|
|
27
|
-
*/
|
|
28
|
-
private _getPatchIncomingRequestFunction;
|
|
29
|
-
/**
|
|
30
|
-
* Creates spans for outgoing requests, sending spans' context for distributed
|
|
31
|
-
* tracing.
|
|
32
|
-
*/
|
|
33
|
-
private _getPatchOutgoingRequestFunction;
|
|
34
|
-
private _getPatchOutgoingGetFunction;
|
|
35
|
-
/** Patches HTTPS outgoing requests */
|
|
36
|
-
private _getPatchHttpsOutgoingRequestFunction;
|
|
37
|
-
private _setDefaultOptions;
|
|
38
|
-
/** Patches HTTPS outgoing get requests */
|
|
39
|
-
private _getPatchHttpsOutgoingGetFunction;
|
|
40
|
-
/**
|
|
41
|
-
* Attach event listeners to a client request to end span and add span attributes.
|
|
42
|
-
*
|
|
43
|
-
* @param request The original request object.
|
|
44
|
-
* @param span representing the current operation
|
|
45
|
-
* @param startTime representing the start time of the request to calculate duration in Metric
|
|
46
|
-
* @param metricAttributes metric attributes for the request duration metric
|
|
47
|
-
*/
|
|
48
|
-
private _traceClientRequest;
|
|
49
|
-
private _incomingRequestFunction;
|
|
50
|
-
private _outgoingRequestFunction;
|
|
51
|
-
private _onServerResponseFinish;
|
|
52
|
-
private _onOutgoingRequestError;
|
|
53
|
-
private _onServerResponseError;
|
|
54
|
-
private _startHttpSpan;
|
|
55
|
-
private _closeHttpSpan;
|
|
56
|
-
private _callResponseHook;
|
|
57
|
-
private _callRequestHook;
|
|
58
|
-
private _callStartSpanHook;
|
|
59
|
-
private _createHeaderCapture;
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=http.d.ts.map
|