@sentry/node 9.15.0 → 9.16.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/build/cjs/integrations/anr/index.js +1 -1
- package/build/cjs/integrations/context.js +1 -0
- package/build/cjs/integrations/context.js.map +1 -1
- package/build/cjs/integrations/http/SentryHttpInstrumentation.js +130 -126
- package/build/cjs/integrations/http/SentryHttpInstrumentation.js.map +1 -1
- package/build/cjs/integrations/http/index.js +30 -24
- package/build/cjs/integrations/http/index.js.map +1 -1
- package/build/cjs/integrations/local-variables/local-variables-async.js +1 -1
- package/build/cjs/integrations/tracing/express-v5/instrumentation.js +4 -2
- package/build/cjs/integrations/tracing/express-v5/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/index.js +2 -4
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma.js +2 -7
- package/build/cjs/integrations/tracing/prisma.js.map +1 -1
- package/build/cjs/integrations/winston.js +2 -2
- package/build/cjs/integrations/winston.js.map +1 -1
- package/build/esm/integrations/anr/index.js +1 -1
- package/build/esm/integrations/anr/worker-script.js +2 -2
- package/build/esm/integrations/context.js +1 -0
- package/build/esm/integrations/context.js.map +1 -1
- package/build/esm/integrations/http/SentryHttpInstrumentation.js +131 -127
- package/build/esm/integrations/http/SentryHttpInstrumentation.js.map +1 -1
- package/build/esm/integrations/http/index.js +30 -24
- package/build/esm/integrations/http/index.js.map +1 -1
- package/build/esm/integrations/local-variables/local-variables-async.js +1 -1
- package/build/esm/integrations/local-variables/worker-script.js +2 -2
- package/build/esm/integrations/tracing/express-v5/instrumentation.js +4 -2
- package/build/esm/integrations/tracing/express-v5/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/index.js +2 -4
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/integrations/tracing/prisma.js +2 -7
- package/build/esm/integrations/tracing/prisma.js.map +1 -1
- package/build/esm/integrations/winston.js +2 -2
- package/build/esm/integrations/winston.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/types/integrations/context.d.ts.map +1 -1
- package/build/types/integrations/http/SentryHttpInstrumentation.d.ts +9 -13
- package/build/types/integrations/http/SentryHttpInstrumentation.d.ts.map +1 -1
- package/build/types/integrations/http/index.d.ts +8 -0
- package/build/types/integrations/http/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/express-v5/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma.d.ts.map +1 -1
- package/build/types/integrations/winston.d.ts +3 -3
- package/build/types-ts3.8/integrations/http/SentryHttpInstrumentation.d.ts +9 -13
- package/build/types-ts3.8/integrations/http/index.d.ts +11 -0
- package/build/types-ts3.8/integrations/winston.d.ts +3 -3
- package/package.json +4 -4
- package/build/cjs/integrations/http/SentryHttpInstrumentationBeforeOtel.js +0 -130
- package/build/cjs/integrations/http/SentryHttpInstrumentationBeforeOtel.js.map +0 -1
- package/build/cjs/integrations/http/utils.js +0 -44
- package/build/cjs/integrations/http/utils.js.map +0 -1
- package/build/cjs/integrations/http/vendor/getRequestInfo.js +0 -130
- package/build/cjs/integrations/http/vendor/getRequestInfo.js.map +0 -1
- package/build/esm/integrations/http/SentryHttpInstrumentationBeforeOtel.js +0 -128
- package/build/esm/integrations/http/SentryHttpInstrumentationBeforeOtel.js.map +0 -1
- package/build/esm/integrations/http/utils.js +0 -42
- package/build/esm/integrations/http/utils.js.map +0 -1
- package/build/esm/integrations/http/vendor/getRequestInfo.js +0 -128
- package/build/esm/integrations/http/vendor/getRequestInfo.js.map +0 -1
- package/build/types/integrations/http/SentryHttpInstrumentationBeforeOtel.d.ts +0 -17
- package/build/types/integrations/http/SentryHttpInstrumentationBeforeOtel.d.ts.map +0 -1
- package/build/types/integrations/http/vendor/getRequestInfo.d.ts +0 -21
- package/build/types/integrations/http/vendor/getRequestInfo.d.ts.map +0 -1
- package/build/types-ts3.8/integrations/http/SentryHttpInstrumentationBeforeOtel.d.ts +0 -20
- package/build/types-ts3.8/integrations/http/vendor/getRequestInfo.d.ts +0 -21
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../src/integrations/http/utils.ts"],"sourcesContent":["/**\n * This is a minimal version of `wrap` from shimmer:\n * https://github.com/othiym23/shimmer/blob/master/index.js\n *\n * In contrast to the original implementation, this version does not allow to unwrap,\n * and does not make it clear that the method is wrapped.\n * This is necessary because we want to wrap the http module with our own code,\n * while still allowing to use the HttpInstrumentation from OTEL.\n *\n * Without this, if we'd just use `wrap` from shimmer, the OTEL instrumentation would remove our wrapping,\n * because it only allows any module to be wrapped a single time.\n */\nexport function stealthWrap<Nodule extends object, FieldName extends keyof Nodule>(\n nodule: Nodule,\n name: FieldName,\n wrapper: (original: Nodule[FieldName]) => Nodule[FieldName],\n): Nodule[FieldName] {\n const original = nodule[name];\n const wrapped = wrapper(original);\n\n defineProperty(nodule, name, wrapped);\n return wrapped;\n}\n\n// Sets a property on an object, preserving its enumerability.\nfunction defineProperty<Nodule extends object, FieldName extends keyof Nodule>(\n obj: Nodule,\n name: FieldName,\n value: Nodule[FieldName],\n): void {\n const enumerable = !!obj[name] && Object.prototype.propertyIsEnumerable.call(obj, name);\n\n Object.defineProperty(obj, name, {\n configurable: true,\n enumerable: enumerable,\n writable: true,\n value: value,\n });\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,WAAW;AAC3B,EAAE,MAAM;AACR,EAAE,IAAI;AACN,EAAE,OAAO;AACT,EAAqB;AACrB,EAAE,MAAM,QAAS,GAAE,MAAM,CAAC,IAAI,CAAC;AAC/B,EAAE,MAAM,OAAQ,GAAE,OAAO,CAAC,QAAQ,CAAC;;AAEnC,EAAE,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC;AACvC,EAAE,OAAO,OAAO;AAChB;;AAEA;AACA,SAAS,cAAc;AACvB,EAAE,GAAG;AACL,EAAE,IAAI;AACN,EAAE,KAAK;AACP,EAAQ;AACR,EAAE,MAAM,aAAa,CAAC,CAAC,GAAG,CAAC,IAAI,CAAE,IAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC;;AAEzF,EAAE,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,EAAE;AACnC,IAAI,YAAY,EAAE,IAAI;AACtB,IAAI,UAAU,EAAE,UAAU;AAC1B,IAAI,QAAQ,EAAE,IAAI;AAClB,IAAI,KAAK,EAAE,KAAK;AAChB,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import * as url from 'url';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Makes sure options is an url object
|
|
5
|
-
* return an object with default value and parsed options
|
|
6
|
-
* @param logger component logger
|
|
7
|
-
* @param options original options for the request
|
|
8
|
-
* @param [extraOptions] additional options for the request
|
|
9
|
-
*/
|
|
10
|
-
const getRequestInfo = (
|
|
11
|
-
logger,
|
|
12
|
-
options,
|
|
13
|
-
extraOptions,
|
|
14
|
-
|
|
15
|
-
) => {
|
|
16
|
-
let pathname;
|
|
17
|
-
let origin;
|
|
18
|
-
let optionsParsed;
|
|
19
|
-
let invalidUrl = false;
|
|
20
|
-
if (typeof options === 'string') {
|
|
21
|
-
try {
|
|
22
|
-
const convertedOptions = stringUrlToHttpOptions(options);
|
|
23
|
-
optionsParsed = convertedOptions;
|
|
24
|
-
pathname = convertedOptions.pathname || '/';
|
|
25
|
-
} catch (e) {
|
|
26
|
-
invalidUrl = true;
|
|
27
|
-
logger.verbose(
|
|
28
|
-
'Unable to parse URL provided to HTTP request, using fallback to determine path. Original error:',
|
|
29
|
-
e,
|
|
30
|
-
);
|
|
31
|
-
// for backward compatibility with how url.parse() behaved.
|
|
32
|
-
optionsParsed = {
|
|
33
|
-
path: options,
|
|
34
|
-
};
|
|
35
|
-
pathname = optionsParsed.path || '/';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
origin = `${optionsParsed.protocol || 'http:'}//${optionsParsed.host}`;
|
|
39
|
-
if (extraOptions !== undefined) {
|
|
40
|
-
Object.assign(optionsParsed, extraOptions);
|
|
41
|
-
}
|
|
42
|
-
} else if (options instanceof url.URL) {
|
|
43
|
-
optionsParsed = {
|
|
44
|
-
protocol: options.protocol,
|
|
45
|
-
hostname:
|
|
46
|
-
typeof options.hostname === 'string' && options.hostname.startsWith('[')
|
|
47
|
-
? options.hostname.slice(1, -1)
|
|
48
|
-
: options.hostname,
|
|
49
|
-
path: `${options.pathname || ''}${options.search || ''}`,
|
|
50
|
-
};
|
|
51
|
-
if (options.port !== '') {
|
|
52
|
-
optionsParsed.port = Number(options.port);
|
|
53
|
-
}
|
|
54
|
-
if (options.username || options.password) {
|
|
55
|
-
optionsParsed.auth = `${options.username}:${options.password}`;
|
|
56
|
-
}
|
|
57
|
-
pathname = options.pathname;
|
|
58
|
-
origin = options.origin;
|
|
59
|
-
if (extraOptions !== undefined) {
|
|
60
|
-
Object.assign(optionsParsed, extraOptions);
|
|
61
|
-
}
|
|
62
|
-
} else {
|
|
63
|
-
optionsParsed = Object.assign({ protocol: options.host ? 'http:' : undefined }, options);
|
|
64
|
-
|
|
65
|
-
const hostname =
|
|
66
|
-
optionsParsed.host ||
|
|
67
|
-
(optionsParsed.port != null ? `${optionsParsed.hostname}${optionsParsed.port}` : optionsParsed.hostname);
|
|
68
|
-
origin = `${optionsParsed.protocol || 'http:'}//${hostname}`;
|
|
69
|
-
|
|
70
|
-
pathname = (options ).pathname;
|
|
71
|
-
if (!pathname && optionsParsed.path) {
|
|
72
|
-
try {
|
|
73
|
-
const parsedUrl = new URL(optionsParsed.path, origin);
|
|
74
|
-
pathname = parsedUrl.pathname || '/';
|
|
75
|
-
} catch (e) {
|
|
76
|
-
pathname = '/';
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// some packages return method in lowercase..
|
|
82
|
-
// ensure upperCase for consistency
|
|
83
|
-
const method = optionsParsed.method ? optionsParsed.method.toUpperCase() : 'GET';
|
|
84
|
-
|
|
85
|
-
return { origin, pathname, method, optionsParsed, invalidUrl };
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Mimics Node.js conversion of URL strings to RequestOptions expected by
|
|
90
|
-
* `http.request` and `https.request` APIs.
|
|
91
|
-
*
|
|
92
|
-
* See https://github.com/nodejs/node/blob/2505e217bba05fc581b572c685c5cf280a16c5a3/lib/internal/url.js#L1415-L1437
|
|
93
|
-
*
|
|
94
|
-
* @param stringUrl
|
|
95
|
-
* @throws TypeError if the URL is not valid.
|
|
96
|
-
*/
|
|
97
|
-
function stringUrlToHttpOptions(stringUrl) {
|
|
98
|
-
// This is heavily inspired by Node.js handling of the same situation, trying
|
|
99
|
-
// to follow it as closely as possible while keeping in mind that we only
|
|
100
|
-
// deal with string URLs, not URL objects.
|
|
101
|
-
const { hostname, pathname, port, username, password, search, protocol, hash, href, origin, host } = new URL(
|
|
102
|
-
stringUrl,
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
const options
|
|
106
|
-
|
|
107
|
-
= {
|
|
108
|
-
protocol: protocol,
|
|
109
|
-
hostname: hostname && hostname[0] === '[' ? hostname.slice(1, -1) : hostname,
|
|
110
|
-
hash: hash,
|
|
111
|
-
search: search,
|
|
112
|
-
pathname: pathname,
|
|
113
|
-
path: `${pathname || ''}${search || ''}`,
|
|
114
|
-
href: href,
|
|
115
|
-
origin: origin,
|
|
116
|
-
host: host,
|
|
117
|
-
};
|
|
118
|
-
if (port !== '') {
|
|
119
|
-
options.port = Number(port);
|
|
120
|
-
}
|
|
121
|
-
if (username || password) {
|
|
122
|
-
options.auth = `${decodeURIComponent(username)}:${decodeURIComponent(password)}`;
|
|
123
|
-
}
|
|
124
|
-
return options;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export { getRequestInfo };
|
|
128
|
-
//# sourceMappingURL=getRequestInfo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getRequestInfo.js","sources":["../../../../../src/integrations/http/vendor/getRequestInfo.ts"],"sourcesContent":["/* eslint-disable complexity */\n\n/**\n * Vendored in from https://github.com/open-telemetry/opentelemetry-js/commit/87bd98edd24c98a5fbb9a56fed4b673b7f17a724\n */\n\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport type { RequestOptions } from 'node:http';\nimport type { DiagLogger } from '@opentelemetry/api';\nimport * as url from 'url';\n\n/**\n * Makes sure options is an url object\n * return an object with default value and parsed options\n * @param logger component logger\n * @param options original options for the request\n * @param [extraOptions] additional options for the request\n */\nexport const getRequestInfo = (\n logger: DiagLogger,\n options: url.URL | RequestOptions | string,\n extraOptions?: RequestOptions,\n): {\n origin: string;\n pathname: string;\n method: string;\n invalidUrl: boolean;\n optionsParsed: RequestOptions;\n} => {\n let pathname: string;\n let origin: string;\n let optionsParsed: RequestOptions;\n let invalidUrl = false;\n if (typeof options === 'string') {\n try {\n const convertedOptions = stringUrlToHttpOptions(options);\n optionsParsed = convertedOptions;\n pathname = convertedOptions.pathname || '/';\n } catch (e) {\n invalidUrl = true;\n logger.verbose(\n 'Unable to parse URL provided to HTTP request, using fallback to determine path. Original error:',\n e,\n );\n // for backward compatibility with how url.parse() behaved.\n optionsParsed = {\n path: options,\n };\n pathname = optionsParsed.path || '/';\n }\n\n origin = `${optionsParsed.protocol || 'http:'}//${optionsParsed.host}`;\n if (extraOptions !== undefined) {\n Object.assign(optionsParsed, extraOptions);\n }\n } else if (options instanceof url.URL) {\n optionsParsed = {\n protocol: options.protocol,\n hostname:\n typeof options.hostname === 'string' && options.hostname.startsWith('[')\n ? options.hostname.slice(1, -1)\n : options.hostname,\n path: `${options.pathname || ''}${options.search || ''}`,\n };\n if (options.port !== '') {\n optionsParsed.port = Number(options.port);\n }\n if (options.username || options.password) {\n optionsParsed.auth = `${options.username}:${options.password}`;\n }\n pathname = options.pathname;\n origin = options.origin;\n if (extraOptions !== undefined) {\n Object.assign(optionsParsed, extraOptions);\n }\n } else {\n optionsParsed = Object.assign({ protocol: options.host ? 'http:' : undefined }, options);\n\n const hostname =\n optionsParsed.host ||\n (optionsParsed.port != null ? `${optionsParsed.hostname}${optionsParsed.port}` : optionsParsed.hostname);\n origin = `${optionsParsed.protocol || 'http:'}//${hostname}`;\n\n pathname = (options as url.URL).pathname;\n if (!pathname && optionsParsed.path) {\n try {\n const parsedUrl = new URL(optionsParsed.path, origin);\n pathname = parsedUrl.pathname || '/';\n } catch (e) {\n pathname = '/';\n }\n }\n }\n\n // some packages return method in lowercase..\n // ensure upperCase for consistency\n const method = optionsParsed.method ? optionsParsed.method.toUpperCase() : 'GET';\n\n return { origin, pathname, method, optionsParsed, invalidUrl };\n};\n\n/**\n * Mimics Node.js conversion of URL strings to RequestOptions expected by\n * `http.request` and `https.request` APIs.\n *\n * See https://github.com/nodejs/node/blob/2505e217bba05fc581b572c685c5cf280a16c5a3/lib/internal/url.js#L1415-L1437\n *\n * @param stringUrl\n * @throws TypeError if the URL is not valid.\n */\nfunction stringUrlToHttpOptions(stringUrl: string): RequestOptions & { pathname: string } {\n // This is heavily inspired by Node.js handling of the same situation, trying\n // to follow it as closely as possible while keeping in mind that we only\n // deal with string URLs, not URL objects.\n const { hostname, pathname, port, username, password, search, protocol, hash, href, origin, host } = new URL(\n stringUrl,\n );\n\n const options: RequestOptions & {\n pathname: string;\n hash: string;\n search: string;\n href: string;\n origin: string;\n } = {\n protocol: protocol,\n hostname: hostname && hostname[0] === '[' ? hostname.slice(1, -1) : hostname,\n hash: hash,\n search: search,\n pathname: pathname,\n path: `${pathname || ''}${search || ''}`,\n href: href,\n origin: origin,\n host: host,\n };\n if (port !== '') {\n options.port = Number(port);\n }\n if (username || password) {\n options.auth = `${decodeURIComponent(username)}:${decodeURIComponent(password)}`;\n }\n return options;\n}\n"],"names":[],"mappings":";;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,iBAAiB;AAC9B,EAAE,MAAM;AACR,EAAE,OAAO;AACT,EAAE,YAAY;;AAOd,KAAK;AACL,EAAE,IAAI,QAAQ;AACd,EAAE,IAAI,MAAM;AACZ,EAAE,IAAI,aAAa;AACnB,EAAE,IAAI,UAAW,GAAE,KAAK;AACxB,EAAE,IAAI,OAAO,OAAQ,KAAI,QAAQ,EAAE;AACnC,IAAI,IAAI;AACR,MAAM,MAAM,gBAAiB,GAAE,sBAAsB,CAAC,OAAO,CAAC;AAC9D,MAAM,aAAA,GAAgB,gBAAgB;AACtC,MAAM,WAAW,gBAAgB,CAAC,QAAA,IAAY,GAAG;AACjD,KAAM,CAAA,OAAO,CAAC,EAAE;AAChB,MAAM,UAAA,GAAa,IAAI;AACvB,MAAM,MAAM,CAAC,OAAO;AACpB,QAAQ,iGAAiG;AACzG,QAAQ,CAAC;AACT,OAAO;AACP;AACA,MAAM,gBAAgB;AACtB,QAAQ,IAAI,EAAE,OAAO;AACrB,OAAO;AACP,MAAM,WAAW,aAAa,CAAC,IAAA,IAAQ,GAAG;AAC1C;;AAEA,IAAI,MAAA,GAAS,CAAC,EAAA,aAAA,CAAA,QAAA,IAAA,OAAA,CAAA,EAAA,EAAA,aAAA,CAAA,IAAA,CAAA,CAAA;AACA,IAAA,IAAA,YAAA,KAAA,SAAA,EAAA;AACA,MAAA,MAAA,CAAA,MAAA,CAAA,aAAA,EAAA,YAAA,CAAA;AACA;AACA,GAAA,MAAA,IAAA,OAAA,YAAA,GAAA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;AACA,IAAA,QAAA,EAAA,QAAA;AACA,IAAA,IAAA,EAAA,CAAA,EAAA,QAAA,IAAA,EAAA,CAAA,EAAA,MAAA,IAAA,EAAA,CAAA,CAAA;AACA,IAAA,IAAA,EAAA,IAAA;AACA,IAAA,MAAA,EAAA,MAAA;AACA,IAAA,IAAA,EAAA,IAAA;AACA,GAAA;AACA,EAAA,IAAA,IAAA,KAAA,EAAA,EAAA;AACA,IAAA,OAAA,CAAA,IAAA,GAAA,MAAA,CAAA,IAAA,CAAA;AACA;AACA,EAAA,IAAA,QAAA,IAAA,QAAA,EAAA;AACA,IAAA,OAAA,CAAA,IAAA,GAAA,CAAA,EAAA,kBAAA,CAAA,QAAA,CAAA,CAAA,CAAA,EAAA,kBAAA,CAAA,QAAA,CAAA,CAAA,CAAA;AACA;AACA,EAAA,OAAA,OAAA;AACA;;;;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
2
|
-
/**
|
|
3
|
-
* A Sentry specific http instrumentation that is applied before the otel instrumentation.
|
|
4
|
-
*/
|
|
5
|
-
export declare class SentryHttpInstrumentationBeforeOtel extends InstrumentationBase {
|
|
6
|
-
constructor();
|
|
7
|
-
init(): [InstrumentationNodeModuleDefinition, InstrumentationNodeModuleDefinition];
|
|
8
|
-
/** Get the instrumentation for the http module. */
|
|
9
|
-
private _getHttpInstrumentation;
|
|
10
|
-
/** Get the instrumentation for the https module. */
|
|
11
|
-
private _getHttpsInstrumentation;
|
|
12
|
-
/**
|
|
13
|
-
* Patch the incoming request function for request isolation.
|
|
14
|
-
*/
|
|
15
|
-
private _getPatchIncomingRequestFunction;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=SentryHttpInstrumentationBeforeOtel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SentryHttpInstrumentationBeforeOtel.d.ts","sourceRoot":"","sources":["../../../../src/integrations/http/SentryHttpInstrumentationBeforeOtel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,mCAAmC,EAAE,MAAM,gCAAgC,CAAC;AAmB1G;;GAEG;AACH,qBAAa,mCAAoC,SAAQ,mBAAmB;;IAMnE,IAAI,IAAI,CAAC,mCAAmC,EAAE,mCAAmC,CAAC;IAIzF,mDAAmD;IACnD,OAAO,CAAC,uBAAuB;IAS/B,oDAAoD;IACpD,OAAO,CAAC,wBAAwB;IAShC;;OAEG;IACH,OAAO,CAAC,gCAAgC;CAoBzC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vendored in from https://github.com/open-telemetry/opentelemetry-js/commit/87bd98edd24c98a5fbb9a56fed4b673b7f17a724
|
|
3
|
-
*/
|
|
4
|
-
import type { RequestOptions } from 'node:http';
|
|
5
|
-
import type { DiagLogger } from '@opentelemetry/api';
|
|
6
|
-
import * as url from 'url';
|
|
7
|
-
/**
|
|
8
|
-
* Makes sure options is an url object
|
|
9
|
-
* return an object with default value and parsed options
|
|
10
|
-
* @param logger component logger
|
|
11
|
-
* @param options original options for the request
|
|
12
|
-
* @param [extraOptions] additional options for the request
|
|
13
|
-
*/
|
|
14
|
-
export declare const getRequestInfo: (logger: DiagLogger, options: url.URL | RequestOptions | string, extraOptions?: RequestOptions) => {
|
|
15
|
-
origin: string;
|
|
16
|
-
pathname: string;
|
|
17
|
-
method: string;
|
|
18
|
-
invalidUrl: boolean;
|
|
19
|
-
optionsParsed: RequestOptions;
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=getRequestInfo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getRequestInfo.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/http/vendor/getRequestInfo.ts"],"names":[],"mappings":"AAEA;;GAEG;AAiBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,WACjB,UAAU,WACT,OAAO,GAAG,cAAc,GAAG,MAAM,iBAC3B,cAAc;YAErB,MAAM;cACJ,MAAM;YACR,MAAM;gBACF,OAAO;mBACJ,cAAc;CAwE9B,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
2
|
-
/**
|
|
3
|
-
* A Sentry specific http instrumentation that is applied before the otel instrumentation.
|
|
4
|
-
*/
|
|
5
|
-
export declare class SentryHttpInstrumentationBeforeOtel extends InstrumentationBase {
|
|
6
|
-
constructor();
|
|
7
|
-
init(): [
|
|
8
|
-
InstrumentationNodeModuleDefinition,
|
|
9
|
-
InstrumentationNodeModuleDefinition
|
|
10
|
-
];
|
|
11
|
-
/** Get the instrumentation for the http module. */
|
|
12
|
-
private _getHttpInstrumentation;
|
|
13
|
-
/** Get the instrumentation for the https module. */
|
|
14
|
-
private _getHttpsInstrumentation;
|
|
15
|
-
/**
|
|
16
|
-
* Patch the incoming request function for request isolation.
|
|
17
|
-
*/
|
|
18
|
-
private _getPatchIncomingRequestFunction;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=SentryHttpInstrumentationBeforeOtel.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vendored in from https://github.com/open-telemetry/opentelemetry-js/commit/87bd98edd24c98a5fbb9a56fed4b673b7f17a724
|
|
3
|
-
*/
|
|
4
|
-
import { RequestOptions } from 'node:http';
|
|
5
|
-
import { DiagLogger } from '@opentelemetry/api';
|
|
6
|
-
import * as url from 'url';
|
|
7
|
-
/**
|
|
8
|
-
* Makes sure options is an url object
|
|
9
|
-
* return an object with default value and parsed options
|
|
10
|
-
* @param logger component logger
|
|
11
|
-
* @param options original options for the request
|
|
12
|
-
* @param [extraOptions] additional options for the request
|
|
13
|
-
*/
|
|
14
|
-
export declare const getRequestInfo: (logger: DiagLogger, options: url.URL | RequestOptions | string, extraOptions?: RequestOptions) => {
|
|
15
|
-
origin: string;
|
|
16
|
-
pathname: string;
|
|
17
|
-
method: string;
|
|
18
|
-
invalidUrl: boolean;
|
|
19
|
-
optionsParsed: RequestOptions;
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=getRequestInfo.d.ts.map
|