@opentelemetry/instrumentation-http
Advanced tools
Comparing version 0.50.0 to 0.51.0
/// <reference types="node" /> | ||
import type * as http from 'http'; | ||
import * as url from 'url'; | ||
import { Func, Http, HttpInstrumentationConfig, HttpRequestArgs, Https } from './types'; | ||
import { Func, HttpInstrumentationConfig, HttpRequestArgs } from './types'; | ||
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation'; | ||
@@ -9,3 +9,3 @@ /** | ||
*/ | ||
export declare class HttpInstrumentation extends InstrumentationBase<Http> { | ||
export declare class HttpInstrumentation extends InstrumentationBase { | ||
/** keep track on spans not ended */ | ||
@@ -21,4 +21,4 @@ private readonly _spanNotEnded; | ||
init(): [ | ||
InstrumentationNodeModuleDefinition<Https>, | ||
InstrumentationNodeModuleDefinition<Http> | ||
InstrumentationNodeModuleDefinition, | ||
InstrumentationNodeModuleDefinition | ||
]; | ||
@@ -25,0 +25,0 @@ private _getHttpInstrumentation; |
@@ -62,5 +62,3 @@ "use strict"; | ||
_getHttpInstrumentation() { | ||
const version = process.versions.node; | ||
return new instrumentation_1.InstrumentationNodeModuleDefinition('http', ['*'], moduleExports => { | ||
this._diag.debug(`Applying patch for http@${version}`); | ||
return new instrumentation_1.InstrumentationNodeModuleDefinition('http', ['*'], (moduleExports) => { | ||
if ((0, instrumentation_1.isWrapped)(moduleExports.request)) { | ||
@@ -79,6 +77,5 @@ this._unwrap(moduleExports, 'request'); | ||
return moduleExports; | ||
}, moduleExports => { | ||
}, (moduleExports) => { | ||
if (moduleExports === undefined) | ||
return; | ||
this._diag.debug(`Removing patch for http@${version}`); | ||
this._unwrap(moduleExports, 'request'); | ||
@@ -90,5 +87,3 @@ this._unwrap(moduleExports, 'get'); | ||
_getHttpsInstrumentation() { | ||
const version = process.versions.node; | ||
return new instrumentation_1.InstrumentationNodeModuleDefinition('https', ['*'], moduleExports => { | ||
this._diag.debug(`Applying patch for https@${version}`); | ||
return new instrumentation_1.InstrumentationNodeModuleDefinition('https', ['*'], (moduleExports) => { | ||
if ((0, instrumentation_1.isWrapped)(moduleExports.request)) { | ||
@@ -107,6 +102,5 @@ this._unwrap(moduleExports, 'request'); | ||
return moduleExports; | ||
}, moduleExports => { | ||
}, (moduleExports) => { | ||
if (moduleExports === undefined) | ||
return; | ||
this._diag.debug(`Removing patch for https@${version}`); | ||
this._unwrap(moduleExports, 'request'); | ||
@@ -113,0 +107,0 @@ this._unwrap(moduleExports, 'get'); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.50.0"; | ||
export declare const VERSION = "0.51.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.50.0'; | ||
exports.VERSION = '0.51.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-http", | ||
"version": "0.50.0", | ||
"version": "0.51.0", | ||
"description": "OpenTelemetry http/https automatic instrumentation package.", | ||
@@ -49,6 +49,6 @@ "main": "build/src/index.js", | ||
"@opentelemetry/api": "1.8.0", | ||
"@opentelemetry/context-async-hooks": "1.23.0", | ||
"@opentelemetry/sdk-metrics": "1.23.0", | ||
"@opentelemetry/sdk-trace-base": "1.23.0", | ||
"@opentelemetry/sdk-trace-node": "1.23.0", | ||
"@opentelemetry/context-async-hooks": "1.24.0", | ||
"@opentelemetry/sdk-metrics": "1.24.0", | ||
"@opentelemetry/sdk-trace-base": "1.24.0", | ||
"@opentelemetry/sdk-trace-node": "1.24.0", | ||
"@types/mocha": "10.0.6", | ||
@@ -60,3 +60,3 @@ "@types/node": "18.6.5", | ||
"@types/superagent": "4.1.24", | ||
"axios": "1.5.1", | ||
"axios": "1.6.0", | ||
"codecov": "3.8.3", | ||
@@ -79,5 +79,5 @@ "cross-var": "1.1.0", | ||
"dependencies": { | ||
"@opentelemetry/core": "1.23.0", | ||
"@opentelemetry/instrumentation": "0.50.0", | ||
"@opentelemetry/semantic-conventions": "1.23.0", | ||
"@opentelemetry/core": "1.24.0", | ||
"@opentelemetry/instrumentation": "0.51.0", | ||
"@opentelemetry/semantic-conventions": "1.24.0", | ||
"semver": "^7.5.2" | ||
@@ -87,3 +87,3 @@ }, | ||
"sideEffects": false, | ||
"gitHead": "5231aa255047fbc6ee3d6a299f4423ab2f8a5fbc" | ||
"gitHead": "3ab4f765d8d696327b7d139ae6a45e7bd7edd924" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
178899
1355
+ Added@opentelemetry/api-logs@0.51.0(transitive)
+ Added@opentelemetry/core@1.24.0(transitive)
+ Added@opentelemetry/instrumentation@0.51.0(transitive)
+ Added@opentelemetry/semantic-conventions@1.24.0(transitive)
- Removed@opentelemetry/api-logs@0.50.0(transitive)
- Removed@opentelemetry/core@1.23.0(transitive)
- Removed@opentelemetry/instrumentation@0.50.0(transitive)
- Removed@opentelemetry/semantic-conventions@1.23.0(transitive)
Updated@opentelemetry/core@1.24.0