@opentelemetry/instrumentation-document-load
Advanced tools
Comparing version 0.39.0 to 0.40.0
@@ -6,10 +6,6 @@ import { InstrumentationBase } from '@opentelemetry/instrumentation'; | ||
*/ | ||
export declare class DocumentLoadInstrumentation extends InstrumentationBase { | ||
export declare class DocumentLoadInstrumentation extends InstrumentationBase<DocumentLoadInstrumentationConfig> { | ||
readonly component: string; | ||
readonly version: string; | ||
moduleName: string; | ||
/** | ||
* | ||
* @param config | ||
*/ | ||
constructor(config?: DocumentLoadInstrumentationConfig); | ||
@@ -55,3 +51,2 @@ init(): void; | ||
private _waitForPageLoad; | ||
private _getConfig; | ||
/** | ||
@@ -58,0 +53,0 @@ * adds custom attributes to root span if configured |
@@ -44,6 +44,2 @@ /* | ||
__extends(DocumentLoadInstrumentation, _super); | ||
/** | ||
* | ||
* @param config | ||
*/ | ||
function DocumentLoadInstrumentation(config) { | ||
@@ -103,6 +99,6 @@ if (config === void 0) { config = {}; } | ||
var _a; | ||
if (!_this._getConfig().ignoreNetworkEvents) { | ||
if (!_this.getConfig().ignoreNetworkEvents) { | ||
addSpanNetworkEvents(fetchSpan, entries); | ||
} | ||
_this._addCustomAttributesOnSpan(fetchSpan, (_a = _this._getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentFetch); | ||
_this._addCustomAttributesOnSpan(fetchSpan, (_a = _this.getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentFetch); | ||
_this._endSpan(fetchSpan, PTN.RESPONSE_END, entries); | ||
@@ -115,3 +111,3 @@ }); | ||
_this._addResourcesSpans(rootSpan); | ||
if (!_this._getConfig().ignoreNetworkEvents) { | ||
if (!_this.getConfig().ignoreNetworkEvents) { | ||
addSpanNetworkEvent(rootSpan, PTN.FETCH_START, entries); | ||
@@ -127,6 +123,6 @@ addSpanNetworkEvent(rootSpan, PTN.UNLOAD_EVENT_START, entries); | ||
} | ||
if (!_this._getConfig().ignorePerformancePaintEvents) { | ||
if (!_this.getConfig().ignorePerformancePaintEvents) { | ||
addSpanPerformancePaintEvents(rootSpan); | ||
} | ||
_this._addCustomAttributesOnSpan(rootSpan, (_a = _this._getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentLoad); | ||
_this._addCustomAttributesOnSpan(rootSpan, (_a = _this.getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentLoad); | ||
_this._endSpan(rootSpan, PTN.LOAD_EVENT_END, entries); | ||
@@ -163,6 +159,6 @@ }); | ||
span.setAttribute(SEMATTRS_HTTP_URL, resource.name); | ||
if (!this._getConfig().ignoreNetworkEvents) { | ||
if (!this.getConfig().ignoreNetworkEvents) { | ||
addSpanNetworkEvents(span, resource); | ||
} | ||
this._addCustomAttributesOnResourceSpan(span, resource, (_a = this._getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.resourceFetch); | ||
this._addCustomAttributesOnResourceSpan(span, resource, (_a = this.getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.resourceFetch); | ||
this._endSpan(span, PTN.RESPONSE_END, resource); | ||
@@ -200,5 +196,2 @@ } | ||
}; | ||
DocumentLoadInstrumentation.prototype._getConfig = function () { | ||
return this._config; | ||
}; | ||
/** | ||
@@ -205,0 +198,0 @@ * adds custom attributes to root span if configured |
@@ -1,3 +0,3 @@ | ||
export declare const PACKAGE_VERSION = "0.39.0"; | ||
export declare const PACKAGE_VERSION = "0.40.0"; | ||
export declare const PACKAGE_NAME = "@opentelemetry/instrumentation-document-load"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,4 +17,4 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export var PACKAGE_VERSION = '0.39.0'; | ||
export var PACKAGE_VERSION = '0.40.0'; | ||
export var PACKAGE_NAME = '@opentelemetry/instrumentation-document-load'; | ||
//# sourceMappingURL=version.js.map |
@@ -6,10 +6,6 @@ import { InstrumentationBase } from '@opentelemetry/instrumentation'; | ||
*/ | ||
export declare class DocumentLoadInstrumentation extends InstrumentationBase { | ||
export declare class DocumentLoadInstrumentation extends InstrumentationBase<DocumentLoadInstrumentationConfig> { | ||
readonly component: string; | ||
readonly version: string; | ||
moduleName: string; | ||
/** | ||
* | ||
* @param config | ||
*/ | ||
constructor(config?: DocumentLoadInstrumentationConfig); | ||
@@ -55,3 +51,2 @@ init(): void; | ||
private _waitForPageLoad; | ||
private _getConfig; | ||
/** | ||
@@ -58,0 +53,0 @@ * adds custom attributes to root span if configured |
@@ -28,6 +28,2 @@ /* | ||
export class DocumentLoadInstrumentation extends InstrumentationBase { | ||
/** | ||
* | ||
* @param config | ||
*/ | ||
constructor(config = {}) { | ||
@@ -82,6 +78,6 @@ super(PACKAGE_NAME, PACKAGE_VERSION, config); | ||
var _a; | ||
if (!this._getConfig().ignoreNetworkEvents) { | ||
if (!this.getConfig().ignoreNetworkEvents) { | ||
addSpanNetworkEvents(fetchSpan, entries); | ||
} | ||
this._addCustomAttributesOnSpan(fetchSpan, (_a = this._getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentFetch); | ||
this._addCustomAttributesOnSpan(fetchSpan, (_a = this.getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentFetch); | ||
this._endSpan(fetchSpan, PTN.RESPONSE_END, entries); | ||
@@ -94,3 +90,3 @@ }); | ||
this._addResourcesSpans(rootSpan); | ||
if (!this._getConfig().ignoreNetworkEvents) { | ||
if (!this.getConfig().ignoreNetworkEvents) { | ||
addSpanNetworkEvent(rootSpan, PTN.FETCH_START, entries); | ||
@@ -106,6 +102,6 @@ addSpanNetworkEvent(rootSpan, PTN.UNLOAD_EVENT_START, entries); | ||
} | ||
if (!this._getConfig().ignorePerformancePaintEvents) { | ||
if (!this.getConfig().ignorePerformancePaintEvents) { | ||
addSpanPerformancePaintEvents(rootSpan); | ||
} | ||
this._addCustomAttributesOnSpan(rootSpan, (_a = this._getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentLoad); | ||
this._addCustomAttributesOnSpan(rootSpan, (_a = this.getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentLoad); | ||
this._endSpan(rootSpan, PTN.LOAD_EVENT_END, entries); | ||
@@ -142,6 +138,6 @@ }); | ||
span.setAttribute(SEMATTRS_HTTP_URL, resource.name); | ||
if (!this._getConfig().ignoreNetworkEvents) { | ||
if (!this.getConfig().ignoreNetworkEvents) { | ||
addSpanNetworkEvents(span, resource); | ||
} | ||
this._addCustomAttributesOnResourceSpan(span, resource, (_a = this._getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.resourceFetch); | ||
this._addCustomAttributesOnResourceSpan(span, resource, (_a = this.getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.resourceFetch); | ||
this._endSpan(span, PTN.RESPONSE_END, resource); | ||
@@ -179,5 +175,2 @@ } | ||
} | ||
_getConfig() { | ||
return this._config; | ||
} | ||
/** | ||
@@ -184,0 +177,0 @@ * adds custom attributes to root span if configured |
@@ -1,3 +0,3 @@ | ||
export declare const PACKAGE_VERSION = "0.39.0"; | ||
export declare const PACKAGE_VERSION = "0.40.0"; | ||
export declare const PACKAGE_NAME = "@opentelemetry/instrumentation-document-load"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,4 +17,4 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export const PACKAGE_VERSION = '0.39.0'; | ||
export const PACKAGE_VERSION = '0.40.0'; | ||
export const PACKAGE_NAME = '@opentelemetry/instrumentation-document-load'; | ||
//# sourceMappingURL=version.js.map |
@@ -6,10 +6,6 @@ import { InstrumentationBase } from '@opentelemetry/instrumentation'; | ||
*/ | ||
export declare class DocumentLoadInstrumentation extends InstrumentationBase { | ||
export declare class DocumentLoadInstrumentation extends InstrumentationBase<DocumentLoadInstrumentationConfig> { | ||
readonly component: string; | ||
readonly version: string; | ||
moduleName: string; | ||
/** | ||
* | ||
* @param config | ||
*/ | ||
constructor(config?: DocumentLoadInstrumentationConfig); | ||
@@ -55,3 +51,2 @@ init(): void; | ||
private _waitForPageLoad; | ||
private _getConfig; | ||
/** | ||
@@ -58,0 +53,0 @@ * adds custom attributes to root span if configured |
@@ -31,6 +31,2 @@ "use strict"; | ||
class DocumentLoadInstrumentation extends instrumentation_1.InstrumentationBase { | ||
/** | ||
* | ||
* @param config | ||
*/ | ||
constructor(config = {}) { | ||
@@ -85,6 +81,6 @@ super(version_1.PACKAGE_NAME, version_1.PACKAGE_VERSION, config); | ||
var _a; | ||
if (!this._getConfig().ignoreNetworkEvents) { | ||
if (!this.getConfig().ignoreNetworkEvents) { | ||
(0, sdk_trace_web_1.addSpanNetworkEvents)(fetchSpan, entries); | ||
} | ||
this._addCustomAttributesOnSpan(fetchSpan, (_a = this._getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentFetch); | ||
this._addCustomAttributesOnSpan(fetchSpan, (_a = this.getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentFetch); | ||
this._endSpan(fetchSpan, sdk_trace_web_1.PerformanceTimingNames.RESPONSE_END, entries); | ||
@@ -97,3 +93,3 @@ }); | ||
this._addResourcesSpans(rootSpan); | ||
if (!this._getConfig().ignoreNetworkEvents) { | ||
if (!this.getConfig().ignoreNetworkEvents) { | ||
(0, sdk_trace_web_1.addSpanNetworkEvent)(rootSpan, sdk_trace_web_1.PerformanceTimingNames.FETCH_START, entries); | ||
@@ -109,6 +105,6 @@ (0, sdk_trace_web_1.addSpanNetworkEvent)(rootSpan, sdk_trace_web_1.PerformanceTimingNames.UNLOAD_EVENT_START, entries); | ||
} | ||
if (!this._getConfig().ignorePerformancePaintEvents) { | ||
if (!this.getConfig().ignorePerformancePaintEvents) { | ||
(0, utils_1.addSpanPerformancePaintEvents)(rootSpan); | ||
} | ||
this._addCustomAttributesOnSpan(rootSpan, (_a = this._getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentLoad); | ||
this._addCustomAttributesOnSpan(rootSpan, (_a = this.getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentLoad); | ||
this._endSpan(rootSpan, sdk_trace_web_1.PerformanceTimingNames.LOAD_EVENT_END, entries); | ||
@@ -145,6 +141,6 @@ }); | ||
span.setAttribute(semantic_conventions_1.SEMATTRS_HTTP_URL, resource.name); | ||
if (!this._getConfig().ignoreNetworkEvents) { | ||
if (!this.getConfig().ignoreNetworkEvents) { | ||
(0, sdk_trace_web_1.addSpanNetworkEvents)(span, resource); | ||
} | ||
this._addCustomAttributesOnResourceSpan(span, resource, (_a = this._getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.resourceFetch); | ||
this._addCustomAttributesOnResourceSpan(span, resource, (_a = this.getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.resourceFetch); | ||
this._endSpan(span, sdk_trace_web_1.PerformanceTimingNames.RESPONSE_END, resource); | ||
@@ -182,5 +178,2 @@ } | ||
} | ||
_getConfig() { | ||
return this._config; | ||
} | ||
/** | ||
@@ -187,0 +180,0 @@ * adds custom attributes to root span if configured |
@@ -1,3 +0,3 @@ | ||
export declare const PACKAGE_VERSION = "0.39.0"; | ||
export declare const PACKAGE_VERSION = "0.40.0"; | ||
export declare const PACKAGE_NAME = "@opentelemetry/instrumentation-document-load"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,4 +20,4 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.PACKAGE_VERSION = '0.39.0'; | ||
exports.PACKAGE_VERSION = '0.40.0'; | ||
exports.PACKAGE_NAME = '@opentelemetry/instrumentation-document-load'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-document-load", | ||
"version": "0.39.0", | ||
"version": "0.40.0", | ||
"description": "OpenTelemetry instrumentation for document load operations in browser applications", | ||
@@ -14,2 +14,3 @@ "main": "build/src/index.js", | ||
"lint:fix": "eslint . --ext .ts --fix", | ||
"lint:readme": "node ../../../scripts/lint-readme.js", | ||
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-document-load --include-dependencies", | ||
@@ -58,3 +59,3 @@ "prewatch": "npm run precompile", | ||
"@opentelemetry/api": "^1.3.0", | ||
"@rollup/plugin-commonjs": "^25.0.7", | ||
"@rollup/plugin-commonjs": "^26.0.0", | ||
"@rollup/plugin-node-resolve": "^15.2.3", | ||
@@ -64,3 +65,3 @@ "@types/chai": "^4.3.10", | ||
"@types/node": "18.6.5", | ||
"@types/sinon": "10.0.18", | ||
"@types/sinon": "10.0.20", | ||
"@web/dev-server-esbuild": "^1.0.1", | ||
@@ -75,9 +76,9 @@ "@web/dev-server-rollup": "^0.6.1", | ||
"@opentelemetry/core": "^1.8.0", | ||
"@opentelemetry/instrumentation": "^0.52.0", | ||
"@opentelemetry/instrumentation": "^0.53.0", | ||
"@opentelemetry/sdk-trace-base": "^1.0.0", | ||
"@opentelemetry/sdk-trace-web": "^1.15.0", | ||
"@opentelemetry/semantic-conventions": "^1.22.0" | ||
"@opentelemetry/semantic-conventions": "^1.27.0" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/web/opentelemetry-instrumentation-document-load#readme", | ||
"gitHead": "0af1b70f7c3c9763c85ac51fa5e334c1e1512020" | ||
"gitHead": "9dc58afed8134f95908331bcff35c5d9ec46fe9a" | ||
} |
@@ -148,3 +148,3 @@ # OpenTelemetry Instrumentation Document Load | ||
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions | ||
[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE | ||
[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE | ||
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat | ||
@@ -151,0 +151,0 @@ [npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-document-load |
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
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
173096
1527
+ Added@opentelemetry/api-logs@0.53.0(transitive)
+ Added@opentelemetry/instrumentation@0.53.0(transitive)
- Removed@opentelemetry/api-logs@0.52.1(transitive)
- Removed@opentelemetry/instrumentation@0.52.1(transitive)