@opentelemetry/instrumentation-xml-http-request
Advanced tools
Comparing version 0.49.1 to 0.50.0
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.49.1"; | ||
export declare const VERSION = "0.50.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export var VERSION = '0.49.1'; | ||
export var VERSION = '0.50.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -27,2 +27,4 @@ import * as api from '@opentelemetry/api'; | ||
applyCustomAttributesOnSpan?: XHRCustomAttributeFunction; | ||
/** Ignore adding network events as span events */ | ||
ignoreNetworkEvents?: boolean; | ||
} | ||
@@ -29,0 +31,0 @@ /** |
@@ -97,3 +97,5 @@ /* | ||
}); | ||
addSpanNetworkEvents(childSpan, corsPreFlightRequest); | ||
if (!_this._getConfig().ignoreNetworkEvents) { | ||
addSpanNetworkEvents(childSpan, corsPreFlightRequest); | ||
} | ||
childSpan.end(corsPreFlightRequest[PTN.RESPONSE_END]); | ||
@@ -208,3 +210,5 @@ }); | ||
} | ||
addSpanNetworkEvents(span, mainRequest); | ||
if (!this._getConfig().ignoreNetworkEvents) { | ||
addSpanNetworkEvents(span, mainRequest); | ||
} | ||
} | ||
@@ -211,0 +215,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.49.1"; | ||
export declare const VERSION = "0.50.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export const VERSION = '0.49.1'; | ||
export const VERSION = '0.50.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -27,2 +27,4 @@ import * as api from '@opentelemetry/api'; | ||
applyCustomAttributesOnSpan?: XHRCustomAttributeFunction; | ||
/** Ignore adding network events as span events */ | ||
ignoreNetworkEvents?: boolean; | ||
} | ||
@@ -29,0 +31,0 @@ /** |
@@ -79,3 +79,5 @@ /* | ||
}); | ||
addSpanNetworkEvents(childSpan, corsPreFlightRequest); | ||
if (!this._getConfig().ignoreNetworkEvents) { | ||
addSpanNetworkEvents(childSpan, corsPreFlightRequest); | ||
} | ||
childSpan.end(corsPreFlightRequest[PTN.RESPONSE_END]); | ||
@@ -189,3 +191,5 @@ }); | ||
} | ||
addSpanNetworkEvents(span, mainRequest); | ||
if (!this._getConfig().ignoreNetworkEvents) { | ||
addSpanNetworkEvents(span, mainRequest); | ||
} | ||
} | ||
@@ -192,0 +196,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.49.1"; | ||
export declare const VERSION = "0.50.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.49.1'; | ||
exports.VERSION = '0.50.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -27,2 +27,4 @@ import * as api from '@opentelemetry/api'; | ||
applyCustomAttributesOnSpan?: XHRCustomAttributeFunction; | ||
/** Ignore adding network events as span events */ | ||
ignoreNetworkEvents?: boolean; | ||
} | ||
@@ -29,0 +31,0 @@ /** |
@@ -82,3 +82,5 @@ "use strict"; | ||
}); | ||
(0, sdk_trace_web_1.addSpanNetworkEvents)(childSpan, corsPreFlightRequest); | ||
if (!this._getConfig().ignoreNetworkEvents) { | ||
(0, sdk_trace_web_1.addSpanNetworkEvents)(childSpan, corsPreFlightRequest); | ||
} | ||
childSpan.end(corsPreFlightRequest[sdk_trace_web_1.PerformanceTimingNames.RESPONSE_END]); | ||
@@ -192,3 +194,5 @@ }); | ||
} | ||
(0, sdk_trace_web_1.addSpanNetworkEvents)(span, mainRequest); | ||
if (!this._getConfig().ignoreNetworkEvents) { | ||
(0, sdk_trace_web_1.addSpanNetworkEvents)(span, mainRequest); | ||
} | ||
} | ||
@@ -195,0 +199,0 @@ } |
{ | ||
"name": "@opentelemetry/instrumentation-xml-http-request", | ||
"version": "0.49.1", | ||
"version": "0.50.0", | ||
"description": "OpenTelemetry XMLHttpRequest automatic instrumentation package.", | ||
@@ -60,5 +60,5 @@ "main": "build/src/index.js", | ||
"@opentelemetry/api": "1.8.0", | ||
"@opentelemetry/context-zone": "1.22.0", | ||
"@opentelemetry/propagator-b3": "1.22.0", | ||
"@opentelemetry/sdk-trace-base": "1.22.0", | ||
"@opentelemetry/context-zone": "1.23.0", | ||
"@opentelemetry/propagator-b3": "1.23.0", | ||
"@opentelemetry/sdk-trace-base": "1.23.0", | ||
"@types/mocha": "10.0.6", | ||
@@ -93,10 +93,10 @@ "@types/node": "18.6.5", | ||
"dependencies": { | ||
"@opentelemetry/core": "1.22.0", | ||
"@opentelemetry/instrumentation": "0.49.1", | ||
"@opentelemetry/sdk-trace-web": "1.22.0", | ||
"@opentelemetry/semantic-conventions": "1.22.0" | ||
"@opentelemetry/core": "1.23.0", | ||
"@opentelemetry/instrumentation": "0.50.0", | ||
"@opentelemetry/sdk-trace-web": "1.23.0", | ||
"@opentelemetry/semantic-conventions": "1.23.0" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-xml-http-request", | ||
"sideEffects": false, | ||
"gitHead": "3920b158d08daa776280bde68a79e44bafa4e8ea" | ||
"gitHead": "5231aa255047fbc6ee3d6a299f4423ab2f8a5fbc" | ||
} |
@@ -67,2 +67,11 @@ # OpenTelemetry XMLHttpRequest Instrumentation for web | ||
### XHR Instrumentation options | ||
XHR instrumentation plugin has few options available to choose from. You can set the following: | ||
| Options | Type | Description | | ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|-----------------------------------------------------------------------------------------| | ||
| [`applyCustomAttributesOnSpan`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-xml-http-request/src/xhr.ts#L76) | `XHRCustomAttributeFunction` | Function for adding custom attributes | | ||
| [`ignoreNetworkEvents`](https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation-xml-http-request/src/xhr.ts#L78) | `boolean` | Disable network events being added as span events (network events are added by default) | | ||
## Example Screenshots | ||
@@ -69,0 +78,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
202163
2026
99
+ Added@opentelemetry/api-logs@0.50.0(transitive)
+ Added@opentelemetry/core@1.23.0(transitive)
+ Added@opentelemetry/instrumentation@0.50.0(transitive)
+ Added@opentelemetry/resources@1.23.0(transitive)
+ Added@opentelemetry/sdk-trace-base@1.23.0(transitive)
+ Added@opentelemetry/sdk-trace-web@1.23.0(transitive)
+ Added@opentelemetry/semantic-conventions@1.23.0(transitive)
- Removed@opentelemetry/api-logs@0.49.1(transitive)
- Removed@opentelemetry/core@1.22.0(transitive)
- Removed@opentelemetry/instrumentation@0.49.1(transitive)
- Removed@opentelemetry/resources@1.22.0(transitive)
- Removed@opentelemetry/sdk-trace-base@1.22.0(transitive)
- Removed@opentelemetry/sdk-trace-web@1.22.0(transitive)
- Removed@opentelemetry/semantic-conventions@1.22.0(transitive)
Updated@opentelemetry/core@1.23.0