@opentelemetry/instrumentation-http
Advanced tools
Comparing version 0.26.0 to 0.27.0
@@ -5,3 +5,3 @@ /// <reference types="node" /> | ||
import { Func, Http, HttpInstrumentationConfig, HttpRequestArgs, Https } from './types'; | ||
import { InstrumentationBase, InstrumentationConfig, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation'; | ||
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation'; | ||
/** | ||
@@ -15,5 +15,5 @@ * Http instrumentation instrumentation for Opentelemetry | ||
private _headerCapture; | ||
constructor(config?: HttpInstrumentationConfig & InstrumentationConfig); | ||
constructor(config?: HttpInstrumentationConfig); | ||
private _getConfig; | ||
setConfig(config?: HttpInstrumentationConfig & InstrumentationConfig): void; | ||
setConfig(config?: HttpInstrumentationConfig): void; | ||
init(): [InstrumentationNodeModuleDefinition<Https>, InstrumentationNodeModuleDefinition<Http>]; | ||
@@ -20,0 +20,0 @@ private _getHttpInstrumentation; |
@@ -31,4 +31,4 @@ "use strict"; | ||
class HttpInstrumentation extends instrumentation_1.InstrumentationBase { | ||
constructor(config = {}) { | ||
super('@opentelemetry/instrumentation-http', version_1.VERSION, Object.assign({}, config)); | ||
constructor(config) { | ||
super('@opentelemetry/instrumentation-http', version_1.VERSION, config); | ||
/** keep track on spans not ended */ | ||
@@ -42,4 +42,4 @@ this._spanNotEnded = new WeakSet(); | ||
} | ||
setConfig(config = {}) { | ||
this._config = Object.assign({}, config); | ||
setConfig(config) { | ||
super.setConfig(config); | ||
this._headerCapture = this._createHeaderCapture(); | ||
@@ -46,0 +46,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.26.0"; | ||
export declare const VERSION = "0.27.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.26.0'; | ||
exports.VERSION = '0.27.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-http", | ||
"version": "0.26.0", | ||
"version": "0.27.0", | ||
"description": "OpenTelemetry http/https automatic instrumentation package.", | ||
@@ -46,6 +46,6 @@ "main": "build/src/index.js", | ||
"devDependencies": { | ||
"@opentelemetry/api": "^1.0.2", | ||
"@opentelemetry/context-async-hooks": "1.0.0", | ||
"@opentelemetry/sdk-trace-base": "1.0.0", | ||
"@opentelemetry/sdk-trace-node": "1.0.0", | ||
"@opentelemetry/api": "^1.0.3", | ||
"@opentelemetry/context-async-hooks": "1.0.1", | ||
"@opentelemetry/sdk-trace-base": "1.0.1", | ||
"@opentelemetry/sdk-trace-node": "1.0.1", | ||
"@types/got": "9.6.12", | ||
@@ -67,3 +67,3 @@ "@types/mocha": "8.2.3", | ||
"rimraf": "3.0.2", | ||
"sinon": "11.1.2", | ||
"sinon": "12.0.1", | ||
"superagent": "6.1.0", | ||
@@ -74,11 +74,11 @@ "ts-mocha": "8.0.0", | ||
"peerDependencies": { | ||
"@opentelemetry/api": "^1.0.2" | ||
"@opentelemetry/api": "^1.0.0" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/core": "1.0.0", | ||
"@opentelemetry/instrumentation": "0.26.0", | ||
"@opentelemetry/semantic-conventions": "1.0.0", | ||
"@opentelemetry/core": "1.0.1", | ||
"@opentelemetry/instrumentation": "0.27.0", | ||
"@opentelemetry/semantic-conventions": "1.0.1", | ||
"semver": "^7.3.5" | ||
}, | ||
"gitHead": "0f5a5bc906a2166c30a4344e460b7206c0b20bac" | ||
"gitHead": "f5e227f0cb829df1ca2dc220a3e0e8ae0e607405" | ||
} |
@@ -50,13 +50,13 @@ # OpenTelemetry HTTP and HTTPS Instrumentation for Node.js | ||
| ------- | ---- | ----------- | | ||
| [`applyCustomAttributesOnSpan`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-instrumentation-http/src/types.ts#L91) | `HttpCustomAttributeFunction` | Function for adding custom attributes | | ||
| [`requestHook`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-instrumentation-http/src/types.ts#93) | `HttpRequestCustomAttributeFunction` | Function for adding custom attributes before request is handled | | ||
| [`responseHook`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-instrumentation-http/src/types.ts#L95) | `HttpResponseCustomAttributeFunction` | Function for adding custom attributes before response is handled | | ||
| [`startIncomingSpanHook`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-instrumentation-http/src/types.ts#L97) | `StartIncomingSpanCustomAttributeFunction` | Function for adding custom attributes before a span is started in incomingRequest | | ||
| [`startOutgoingSpanHook`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-instrumentation-http/src/types.ts#L99) | `StartOutgoingSpanCustomAttributeFunction` | Function for adding custom attributes before a span is started in outgoingRequest | | ||
| [`ignoreIncomingPaths`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-instrumentation-http/src/types.ts#L87) | `IgnoreMatcher[]` | Http instrumentation will not trace all incoming requests that match paths | | ||
| [`ignoreOutgoingUrls`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-instrumentation-http/src/types.ts#L89) | `IgnoreMatcher[]` | Http instrumentation will not trace all outgoing requests that match urls | | ||
| [`serverName`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-instrumentation-http/src/types.ts#L101) | `string` | The primary server name of the matched virtual host. | | ||
| [`requireParentforOutgoingSpans`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-instrumentation-http/src/types.ts#L103) | Boolean | Require that is a parent span to create new span for outgoing requests. | | ||
| [`requireParentforIncomingSpans`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-instrumentation-http/src/types.ts#L105) | Boolean | Require that is a parent span to create new span for incoming requests. | | ||
| [`headersToSpanAttributes`](https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-instrumentation-http/src/types.ts#L107) | `object` | List of case insensitive HTTP headers to convert to span attributes. Client (outgoing requests, incoming responses) and server (incoming requests, outgoing responses) headers will be converted to span attributes in the form of `http.{request\|response}.header.header_name`, e.g. `http.response.header.content_length` | | ||
| [`applyCustomAttributesOnSpan`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/types.ts#L91) | `HttpCustomAttributeFunction` | Function for adding custom attributes | | ||
| [`requestHook`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/types.ts#93) | `HttpRequestCustomAttributeFunction` | Function for adding custom attributes before request is handled | | ||
| [`responseHook`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/types.ts#L95) | `HttpResponseCustomAttributeFunction` | Function for adding custom attributes before response is handled | | ||
| [`startIncomingSpanHook`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/types.ts#L97) | `StartIncomingSpanCustomAttributeFunction` | Function for adding custom attributes before a span is started in incomingRequest | | ||
| [`startOutgoingSpanHook`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/types.ts#L99) | `StartOutgoingSpanCustomAttributeFunction` | Function for adding custom attributes before a span is started in outgoingRequest | | ||
| [`ignoreIncomingPaths`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/types.ts#L87) | `IgnoreMatcher[]` | Http instrumentation will not trace all incoming requests that match paths | | ||
| [`ignoreOutgoingUrls`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/types.ts#L89) | `IgnoreMatcher[]` | Http instrumentation will not trace all outgoing requests that match urls | | ||
| [`serverName`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/types.ts#L101) | `string` | The primary server name of the matched virtual host. | | ||
| [`requireParentforOutgoingSpans`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/types.ts#L103) | Boolean | Require that is a parent span to create new span for outgoing requests. | | ||
| [`requireParentforIncomingSpans`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/types.ts#L105) | Boolean | Require that is a parent span to create new span for incoming requests. | | ||
| [`headersToSpanAttributes`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-http/src/types.ts#L107) | `object` | List of case insensitive HTTP headers to convert to span attributes. Client (outgoing requests, incoming responses) and server (incoming requests, outgoing responses) headers will be converted to span attributes in the form of `http.{request\|response}.header.header_name`, e.g. `http.response.header.content_length` | | ||
@@ -63,0 +63,0 @@ ## Useful links |
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
151831
+ Added@opentelemetry/api@1.0.4(transitive)
+ Added@opentelemetry/api-metrics@0.27.0(transitive)
+ Added@opentelemetry/core@1.0.1(transitive)
+ Added@opentelemetry/instrumentation@0.27.0(transitive)
+ Added@opentelemetry/semantic-conventions@1.0.1(transitive)
- Removed@opentelemetry/api-metrics@0.26.0(transitive)
- Removed@opentelemetry/core@1.0.0(transitive)
- Removed@opentelemetry/instrumentation@0.26.0(transitive)
- Removed@opentelemetry/semantic-conventions@1.0.0(transitive)
Updated@opentelemetry/core@1.0.1