@opentelemetry/browser-instrumentation 0.1.0 → 0.3.0

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/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -14,6 +14,7 @@ npm install @opentelemetry/browser-instrumentation
14
14
  ## Instrumentations
15
15
 
16
16
  - [Navigation Timing](#navigation-timing) — automatic instrumentation for navigation timing
17
+ - [Resource Timing](#resource-timing) — automatic instrumentation for resource timing
17
18
  - [User Action](#user-action) — automatic instrumentation for user actions (clicks)
18
19
  - [Web Vitals](#web-vitals) — automatic instrumentation for Core Web Vitals
19
20
 
@@ -28,6 +29,7 @@ import {
28
29
  } from '@opentelemetry/sdk-logs';
29
30
  import { registerInstrumentations } from '@opentelemetry/instrumentation';
30
31
  import { NavigationTimingInstrumentation } from '@opentelemetry/browser-instrumentation/experimental/navigation-timing';
32
+ import { ResourceTimingInstrumentation } from '@opentelemetry/browser-instrumentation/experimental/resource-timing';
31
33
  import { UserActionInstrumentation } from '@opentelemetry/browser-instrumentation/experimental/user-action';
32
34
  import { WebVitalsInstrumentation } from '@opentelemetry/browser-instrumentation/experimental/web-vitals';
33
35
 
@@ -41,6 +43,7 @@ logs.setGlobalLoggerProvider(logProvider);
41
43
  registerInstrumentations({
42
44
  instrumentations: [
43
45
  new NavigationTimingInstrumentation(),
46
+ new ResourceTimingInstrumentation(),
44
47
  new UserActionInstrumentation(),
45
48
  new WebVitalsInstrumentation(),
46
49
  ],
@@ -59,6 +62,59 @@ Provides automatic instrumentation for [Navigation Timing](https://developer.moz
59
62
 
60
63
  ---
61
64
 
65
+ ### Resource Timing
66
+
67
+ ```typescript
68
+ import { ResourceTimingInstrumentation } from '@opentelemetry/browser-instrumentation/experimental/resource-timing';
69
+ ```
70
+
71
+ Provides automatic instrumentation for [Resource Timing](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming) in web applications, capturing performance metrics for all resources loaded by the browser (scripts, stylesheets, images, fonts, XHR/fetch requests, etc.).
72
+
73
+ - Uses `requestIdleCallback` to avoid blocking the main thread (with automatic `setTimeout` fallback for Safari)
74
+ - Processes resources in configurable batches
75
+ - Captures historical resources loaded before instrumentation was enabled via buffered mode
76
+ - Flushes pending entries on visibility change to prevent data loss
77
+
78
+ #### Configuration
79
+
80
+ ```typescript
81
+ new ResourceTimingInstrumentation({
82
+ // Process 100 resources per batch (default: 50)
83
+ batchSize: 100,
84
+
85
+ // Wait max 2 seconds for idle time before forcing processing (default: 1000)
86
+ forceProcessingAfter: 2000,
87
+
88
+ // Spend max 100ms processing per idle callback (default: 50)
89
+ maxProcessingTime: 100,
90
+
91
+ // Maximum queue size before forcing immediate flush (default: 1000)
92
+ maxQueueSize: 2000,
93
+ });
94
+ ```
95
+
96
+ | Option | Type | Default | Description |
97
+ |--------|------|---------|-------------|
98
+ | `batchSize` | `number` | `50` | Number of resources to process per batch. |
99
+ | `forceProcessingAfter` | `number` | `1000` | Maximum time (ms) to wait for an idle callback before forcing processing. |
100
+ | `maxProcessingTime` | `number` | `50` | Maximum time (ms) to spend processing resources per idle callback. |
101
+ | `maxQueueSize` | `number` | `1000` | Maximum number of resources to queue before forcing immediate flush. |
102
+
103
+ #### Captured Data
104
+
105
+ Each resource timing event includes:
106
+
107
+ - **URL** and **Initiator Type** (script, css, img, xmlhttprequest, fetch, etc.)
108
+ - **Duration** — total resource load time
109
+ - **Timing Phases** — DNS lookup, TCP connection, TLS handshake, request, response
110
+ - **Size Metrics** — transfer size, encoded size, decoded size
111
+ - **Protocol** — HTTP version (h1, h2, h3)
112
+ - **Redirect Info** — redirect timing if applicable
113
+ - **Service Worker** — worker start time if intercepted
114
+ - **Render Blocking** — whether the resource blocked rendering (Chromium only)
115
+
116
+ ---
117
+
62
118
  ### User Action
63
119
 
64
120
  ```typescript
@@ -1,2 +1,3 @@
1
+ import { NavigationTimingInstrumentationConfig } from "./types.js";
1
2
  import { NavigationTimingInstrumentation } from "./instrumentation.js";
2
- export { NavigationTimingInstrumentation };
3
+ export { NavigationTimingInstrumentation, type NavigationTimingInstrumentationConfig };
@@ -7,9 +7,9 @@ import { InstrumentationBase } from "@opentelemetry/instrumentation";
7
7
  */
8
8
  declare class NavigationTimingInstrumentation extends InstrumentationBase<NavigationTimingInstrumentationConfig> {
9
9
  private _lastEntry?;
10
- private _didEmit;
11
10
  private _completeDelayTimeoutId?;
12
11
  private _retryCount;
12
+ private _didEmit;
13
13
  private _isEnabled;
14
14
  private _onLoad;
15
15
  private _onPageHide;
@@ -1,3 +1,4 @@
1
+ import { version } from "../package.js";
1
2
  import { ATTR_NAVIGATION_CONNECT_END, ATTR_NAVIGATION_CONNECT_START, ATTR_NAVIGATION_DECODED_BODY_SIZE, ATTR_NAVIGATION_DOMAIN_LOOKUP_END, ATTR_NAVIGATION_DOMAIN_LOOKUP_START, ATTR_NAVIGATION_DOM_COMPLETE, ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_END, ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_START, ATTR_NAVIGATION_DOM_INTERACTIVE, ATTR_NAVIGATION_DURATION, ATTR_NAVIGATION_ENCODED_BODY_SIZE, ATTR_NAVIGATION_FETCH_START, ATTR_NAVIGATION_LOAD_EVENT_END, ATTR_NAVIGATION_LOAD_EVENT_START, ATTR_NAVIGATION_REDIRECT_COUNT, ATTR_NAVIGATION_REQUEST_START, ATTR_NAVIGATION_RESPONSE_END, ATTR_NAVIGATION_RESPONSE_START, ATTR_NAVIGATION_SECURE_CONNECTION_START, ATTR_NAVIGATION_TRANSFER_SIZE, ATTR_NAVIGATION_TYPE, ATTR_NAVIGATION_UNLOAD_EVENT_END, ATTR_NAVIGATION_UNLOAD_EVENT_START, ATTR_NAVIGATION_URL, NAVIGATION_TIMING_EVENT_NAME } from "./semconv.js";
2
3
  import { SeverityNumber } from "@opentelemetry/api-logs";
3
4
  import { InstrumentationBase } from "@opentelemetry/instrumentation";
@@ -9,18 +10,11 @@ const MAX_RETRIES = 5;
9
10
  */
10
11
  var NavigationTimingInstrumentation = class extends InstrumentationBase {
11
12
  _lastEntry;
12
- _didEmit = false;
13
13
  _completeDelayTimeoutId;
14
14
  _retryCount = 0;
15
- _isEnabled = false;
16
- _onLoad = () => {
17
- this._tryEmitOrSchedule();
18
- };
19
- _onPageHide = () => {
20
- this._handleUnload();
21
- };
15
+ _didEmit = false;
22
16
  constructor(config = {}) {
23
- super("@opentelemetry/instrumentation-navigation-timing", "0.1.0", config);
17
+ super("@opentelemetry/browser-instrumentation/navigation-timing", version, config);
24
18
  }
25
19
  init() {
26
20
  return [];
@@ -28,6 +22,8 @@ var NavigationTimingInstrumentation = class extends InstrumentationBase {
28
22
  enable() {
29
23
  if (this._isEnabled) return;
30
24
  this._isEnabled = true;
25
+ this._onLoad = () => this._tryEmitOrSchedule();
26
+ this._onPageHide = () => this._handleUnload();
31
27
  this._tryEmitOrSchedule();
32
28
  if (this._didEmit) return;
33
29
  window.addEventListener("pagehide", this._onPageHide);
@@ -70,24 +66,32 @@ var NavigationTimingInstrumentation = class extends InstrumentationBase {
70
66
  window.addEventListener("load", this._onLoad, { once: true });
71
67
  return;
72
68
  }
73
- if (this._completeDelayTimeoutId !== void 0 || this._retryCount > MAX_RETRIES) return;
74
- else {
75
- const delay = this._calculateBackoffDelay();
76
- this._retryCount++;
77
- this._completeDelayTimeoutId = window.setTimeout(() => {
78
- this._completeDelayTimeoutId = void 0;
79
- this._tryEmitOrSchedule();
80
- }, delay);
69
+ if (this._completeDelayTimeoutId !== void 0) return;
70
+ if (this._retryCount > MAX_RETRIES) {
71
+ if (this._lastEntry) {
72
+ this._diag.warn("Navigation timing: retries exhausted, emitting incomplete entry");
73
+ this._emitAndCleanup(this._lastEntry);
74
+ } else {
75
+ this._diag.warn("Navigation timing: retries exhausted with no entry available");
76
+ this._unsubscribeAll();
77
+ }
78
+ return;
81
79
  }
80
+ const delay = this._calculateBackoffDelay();
81
+ this._retryCount++;
82
+ this._completeDelayTimeoutId = window.setTimeout(() => {
83
+ this._completeDelayTimeoutId = void 0;
84
+ this._tryEmitOrSchedule();
85
+ }, delay);
82
86
  }
83
87
  _handleUnload() {
84
88
  if (this._didEmit) return;
85
89
  const entry = this._getLatestNavigationEntry() ?? this._lastEntry;
86
- if (!entry) {
90
+ if (entry) this._emitAndCleanup(entry);
91
+ else {
92
+ this._diag.warn("Navigation timing: no entry available at unload");
87
93
  this._unsubscribeAll();
88
- return;
89
94
  }
90
- this._emitAndCleanup(entry);
91
95
  }
92
96
  _emitAndCleanup(entry) {
93
97
  if (this._didEmit) return;
@@ -134,8 +138,8 @@ var NavigationTimingInstrumentation = class extends InstrumentationBase {
134
138
  clearTimeout(this._completeDelayTimeoutId);
135
139
  this._completeDelayTimeoutId = void 0;
136
140
  }
137
- window.removeEventListener("load", this._onLoad);
138
- window.removeEventListener("pagehide", this._onPageHide);
141
+ if (this._onLoad) window.removeEventListener("load", this._onLoad);
142
+ if (this._onPageHide) window.removeEventListener("pagehide", this._onPageHide);
139
143
  }
140
144
  };
141
145
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentation.js","names":[],"sources":["../../src/navigation-timing/instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { SeverityNumber } from '@opentelemetry/api-logs';\nimport { InstrumentationBase } from '@opentelemetry/instrumentation';\nimport {\n ATTR_NAVIGATION_CONNECT_END,\n ATTR_NAVIGATION_CONNECT_START,\n ATTR_NAVIGATION_DECODED_BODY_SIZE,\n ATTR_NAVIGATION_DOM_COMPLETE,\n ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_END,\n ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_START,\n ATTR_NAVIGATION_DOM_INTERACTIVE,\n ATTR_NAVIGATION_DOMAIN_LOOKUP_END,\n ATTR_NAVIGATION_DOMAIN_LOOKUP_START,\n ATTR_NAVIGATION_DURATION,\n ATTR_NAVIGATION_ENCODED_BODY_SIZE,\n ATTR_NAVIGATION_FETCH_START,\n ATTR_NAVIGATION_LOAD_EVENT_END,\n ATTR_NAVIGATION_LOAD_EVENT_START,\n ATTR_NAVIGATION_REDIRECT_COUNT,\n ATTR_NAVIGATION_REQUEST_START,\n ATTR_NAVIGATION_RESPONSE_END,\n ATTR_NAVIGATION_RESPONSE_START,\n ATTR_NAVIGATION_SECURE_CONNECTION_START,\n ATTR_NAVIGATION_TRANSFER_SIZE,\n ATTR_NAVIGATION_TYPE,\n ATTR_NAVIGATION_UNLOAD_EVENT_END,\n ATTR_NAVIGATION_UNLOAD_EVENT_START,\n ATTR_NAVIGATION_URL,\n NAVIGATION_TIMING_EVENT_NAME,\n} from './semconv.ts';\nimport type { NavigationTimingInstrumentationConfig } from './types.ts';\n\nconst BASE_DELAY_MS = 50;\nconst MAX_RETRIES = 5;\n\n/**\n * This class automatically instruments navigation timing within the browser.\n */\nexport class NavigationTimingInstrumentation extends InstrumentationBase<NavigationTimingInstrumentationConfig> {\n private _lastEntry?: PerformanceNavigationTiming;\n private _didEmit = false;\n private _completeDelayTimeoutId?: number;\n private _retryCount = 0;\n private _isEnabled = false;\n\n private _onLoad = () => {\n this._tryEmitOrSchedule();\n };\n\n private _onPageHide = () => {\n this._handleUnload();\n };\n\n constructor(config: NavigationTimingInstrumentationConfig = {}) {\n super('@opentelemetry/instrumentation-navigation-timing', '0.1.0', config);\n }\n\n protected override init() {\n return [];\n }\n\n override enable(): void {\n if (this._isEnabled) {\n return;\n }\n this._isEnabled = true;\n\n // Try emitting immediately (e.g. when enabled after load),\n // otherwise schedule for `load` or fall back to unload.\n this._tryEmitOrSchedule();\n if (this._didEmit) {\n return;\n }\n\n window.addEventListener('pagehide', this._onPageHide);\n }\n\n override disable(): void {\n this._isEnabled = false;\n this._unsubscribeAll();\n this._lastEntry = undefined;\n this._didEmit = false;\n this._retryCount = 0;\n }\n\n private _getLatestNavigationEntry(): PerformanceNavigationTiming | undefined {\n const entries = performance?.getEntriesByType?.('navigation') as\n | PerformanceNavigationTiming[]\n | undefined;\n if (!entries || entries.length === 0) {\n return;\n }\n\n return entries[entries.length - 1];\n }\n\n private _calculateBackoffDelay(): number {\n return this._retryCount * BASE_DELAY_MS;\n }\n\n /**\n * Attempts to emit the navigation timing event.\n *\n * - Emits immediately if a complete `PerformanceNavigationTiming` entry is available.\n * - If the page is still loading, waits for `window.load` and retries.\n * - If the page is already loaded but the entry is not finalized yet, schedules one\n * deferred re-check (to allow the browser to populate the timing fields).\n *\n * This method can be called multiple times (from `enable()`, the load handler, or the\n * deferred timeout), so it must be safe to re-enter.\n */\n private _tryEmitOrSchedule(): void {\n if (this._didEmit) {\n return;\n }\n\n const entry = this._getLatestNavigationEntry();\n if (entry) {\n this._lastEntry = entry;\n }\n\n // Prefer emitting a \"complete\" navigation entry.\n if (entry && entry.loadEventEnd > 0) {\n this._emitAndCleanup(entry);\n return;\n }\n\n // If the document is still loading, wait for `load` and try again.\n if (document.readyState !== 'complete') {\n window.addEventListener('load', this._onLoad, { once: true });\n return;\n }\n\n // If the document is already complete but navigation timings are not finalized yet,\n // schedule a deferred re-check with linear backoff to allow the browser to finish\n // populating the entry.\n if (\n this._completeDelayTimeoutId !== undefined ||\n this._retryCount > MAX_RETRIES\n ) {\n return;\n } else {\n const delay = this._calculateBackoffDelay();\n this._retryCount++;\n\n this._completeDelayTimeoutId = window.setTimeout(() => {\n this._completeDelayTimeoutId = undefined;\n this._tryEmitOrSchedule();\n }, delay);\n }\n }\n\n private _handleUnload(): void {\n if (this._didEmit) {\n return;\n }\n\n const entry = this._getLatestNavigationEntry() ?? this._lastEntry;\n if (!entry) {\n this._unsubscribeAll();\n return;\n }\n\n // Emit even if partial (e.g. loadEventEnd === 0).\n this._emitAndCleanup(entry);\n }\n\n private _emitAndCleanup(entry: PerformanceNavigationTiming): void {\n if (this._didEmit) {\n return;\n }\n\n this._didEmit = true;\n\n this._emitNavigationTiming(entry);\n this._lastEntry = undefined;\n this._unsubscribeAll();\n }\n\n private _emitNavigationTiming(entry: PerformanceNavigationTiming) {\n if (!entry) {\n return;\n }\n\n this.logger.emit({\n eventName: NAVIGATION_TIMING_EVENT_NAME,\n severityNumber: SeverityNumber.INFO,\n attributes: {\n [ATTR_NAVIGATION_TYPE]: entry.type,\n [ATTR_NAVIGATION_URL]: entry.name,\n [ATTR_NAVIGATION_DURATION]: entry.duration,\n [ATTR_NAVIGATION_DOM_COMPLETE]: entry.domComplete,\n [ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_END]:\n entry.domContentLoadedEventEnd,\n [ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_START]:\n entry.domContentLoadedEventStart,\n [ATTR_NAVIGATION_DOM_INTERACTIVE]: entry.domInteractive,\n [ATTR_NAVIGATION_LOAD_EVENT_END]: entry.loadEventEnd,\n [ATTR_NAVIGATION_LOAD_EVENT_START]: entry.loadEventStart,\n [ATTR_NAVIGATION_REDIRECT_COUNT]: entry.redirectCount,\n [ATTR_NAVIGATION_UNLOAD_EVENT_END]: entry.unloadEventEnd,\n [ATTR_NAVIGATION_UNLOAD_EVENT_START]: entry.unloadEventStart,\n [ATTR_NAVIGATION_FETCH_START]: entry.fetchStart,\n [ATTR_NAVIGATION_DOMAIN_LOOKUP_START]: entry.domainLookupStart,\n [ATTR_NAVIGATION_DOMAIN_LOOKUP_END]: entry.domainLookupEnd,\n [ATTR_NAVIGATION_CONNECT_START]: entry.connectStart,\n [ATTR_NAVIGATION_CONNECT_END]: entry.connectEnd,\n [ATTR_NAVIGATION_SECURE_CONNECTION_START]: entry.secureConnectionStart,\n [ATTR_NAVIGATION_REQUEST_START]: entry.requestStart,\n [ATTR_NAVIGATION_RESPONSE_START]: entry.responseStart,\n [ATTR_NAVIGATION_RESPONSE_END]: entry.responseEnd,\n [ATTR_NAVIGATION_TRANSFER_SIZE]: entry.transferSize,\n [ATTR_NAVIGATION_ENCODED_BODY_SIZE]: entry.encodedBodySize,\n [ATTR_NAVIGATION_DECODED_BODY_SIZE]: entry.decodedBodySize,\n },\n });\n }\n\n private _unsubscribeAll(): void {\n if (this._completeDelayTimeoutId) {\n clearTimeout(this._completeDelayTimeoutId);\n this._completeDelayTimeoutId = undefined;\n }\n\n window.removeEventListener('load', this._onLoad);\n window.removeEventListener('pagehide', this._onPageHide);\n }\n}\n"],"mappings":";;;;AAoCA,MAAM,gBAAgB;AACtB,MAAM,cAAc;;;;AAKpB,IAAa,kCAAb,cAAqD,oBAA2D;CAC9G;CACA,WAAmB;CACnB;CACA,cAAsB;CACtB,aAAqB;CAErB,gBAAwB;AACtB,OAAK,oBAAoB;;CAG3B,oBAA4B;AAC1B,OAAK,eAAe;;CAGtB,YAAY,SAAgD,EAAE,EAAE;AAC9D,QAAM,oDAAoD,SAAS,OAAO;;CAG5E,OAA0B;AACxB,SAAO,EAAE;;CAGX,SAAwB;AACtB,MAAI,KAAK,WACP;AAEF,OAAK,aAAa;AAIlB,OAAK,oBAAoB;AACzB,MAAI,KAAK,SACP;AAGF,SAAO,iBAAiB,YAAY,KAAK,YAAY;;CAGvD,UAAyB;AACvB,OAAK,aAAa;AAClB,OAAK,iBAAiB;AACtB,OAAK,aAAa,KAAA;AAClB,OAAK,WAAW;AAChB,OAAK,cAAc;;CAGrB,4BAA6E;EAC3E,MAAM,UAAU,aAAa,mBAAmB,aAAa;AAG7D,MAAI,CAAC,WAAW,QAAQ,WAAW,EACjC;AAGF,SAAO,QAAQ,QAAQ,SAAS;;CAGlC,yBAAyC;AACvC,SAAO,KAAK,cAAc;;;;;;;;;;;;;CAc5B,qBAAmC;AACjC,MAAI,KAAK,SACP;EAGF,MAAM,QAAQ,KAAK,2BAA2B;AAC9C,MAAI,MACF,MAAK,aAAa;AAIpB,MAAI,SAAS,MAAM,eAAe,GAAG;AACnC,QAAK,gBAAgB,MAAM;AAC3B;;AAIF,MAAI,SAAS,eAAe,YAAY;AACtC,UAAO,iBAAiB,QAAQ,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;AAC7D;;AAMF,MACE,KAAK,4BAA4B,KAAA,KACjC,KAAK,cAAc,YAEnB;OACK;GACL,MAAM,QAAQ,KAAK,wBAAwB;AAC3C,QAAK;AAEL,QAAK,0BAA0B,OAAO,iBAAiB;AACrD,SAAK,0BAA0B,KAAA;AAC/B,SAAK,oBAAoB;MACxB,MAAM;;;CAIb,gBAA8B;AAC5B,MAAI,KAAK,SACP;EAGF,MAAM,QAAQ,KAAK,2BAA2B,IAAI,KAAK;AACvD,MAAI,CAAC,OAAO;AACV,QAAK,iBAAiB;AACtB;;AAIF,OAAK,gBAAgB,MAAM;;CAG7B,gBAAwB,OAA0C;AAChE,MAAI,KAAK,SACP;AAGF,OAAK,WAAW;AAEhB,OAAK,sBAAsB,MAAM;AACjC,OAAK,aAAa,KAAA;AAClB,OAAK,iBAAiB;;CAGxB,sBAA8B,OAAoC;AAChE,MAAI,CAAC,MACH;AAGF,OAAK,OAAO,KAAK;GACf,WAAW;GACX,gBAAgB,eAAe;GAC/B,YAAY;KACT,uBAAuB,MAAM;KAC7B,sBAAsB,MAAM;KAC5B,2BAA2B,MAAM;KACjC,+BAA+B,MAAM;KACrC,+CACC,MAAM;KACP,iDACC,MAAM;KACP,kCAAkC,MAAM;KACxC,iCAAiC,MAAM;KACvC,mCAAmC,MAAM;KACzC,iCAAiC,MAAM;KACvC,mCAAmC,MAAM;KACzC,qCAAqC,MAAM;KAC3C,8BAA8B,MAAM;KACpC,sCAAsC,MAAM;KAC5C,oCAAoC,MAAM;KAC1C,gCAAgC,MAAM;KACtC,8BAA8B,MAAM;KACpC,0CAA0C,MAAM;KAChD,gCAAgC,MAAM;KACtC,iCAAiC,MAAM;KACvC,+BAA+B,MAAM;KACrC,gCAAgC,MAAM;KACtC,oCAAoC,MAAM;KAC1C,oCAAoC,MAAM;IAC5C;GACF,CAAC;;CAGJ,kBAAgC;AAC9B,MAAI,KAAK,yBAAyB;AAChC,gBAAa,KAAK,wBAAwB;AAC1C,QAAK,0BAA0B,KAAA;;AAGjC,SAAO,oBAAoB,QAAQ,KAAK,QAAQ;AAChD,SAAO,oBAAoB,YAAY,KAAK,YAAY"}
1
+ {"version":3,"file":"instrumentation.js","names":[],"sources":["../../src/navigation-timing/instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { SeverityNumber } from '@opentelemetry/api-logs';\nimport { InstrumentationBase } from '@opentelemetry/instrumentation';\nimport { version } from '../../package.json' with { type: 'json' };\nimport {\n ATTR_NAVIGATION_CONNECT_END,\n ATTR_NAVIGATION_CONNECT_START,\n ATTR_NAVIGATION_DECODED_BODY_SIZE,\n ATTR_NAVIGATION_DOM_COMPLETE,\n ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_END,\n ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_START,\n ATTR_NAVIGATION_DOM_INTERACTIVE,\n ATTR_NAVIGATION_DOMAIN_LOOKUP_END,\n ATTR_NAVIGATION_DOMAIN_LOOKUP_START,\n ATTR_NAVIGATION_DURATION,\n ATTR_NAVIGATION_ENCODED_BODY_SIZE,\n ATTR_NAVIGATION_FETCH_START,\n ATTR_NAVIGATION_LOAD_EVENT_END,\n ATTR_NAVIGATION_LOAD_EVENT_START,\n ATTR_NAVIGATION_REDIRECT_COUNT,\n ATTR_NAVIGATION_REQUEST_START,\n ATTR_NAVIGATION_RESPONSE_END,\n ATTR_NAVIGATION_RESPONSE_START,\n ATTR_NAVIGATION_SECURE_CONNECTION_START,\n ATTR_NAVIGATION_TRANSFER_SIZE,\n ATTR_NAVIGATION_TYPE,\n ATTR_NAVIGATION_UNLOAD_EVENT_END,\n ATTR_NAVIGATION_UNLOAD_EVENT_START,\n ATTR_NAVIGATION_URL,\n NAVIGATION_TIMING_EVENT_NAME,\n} from './semconv.ts';\nimport type { NavigationTimingInstrumentationConfig } from './types.ts';\n\nconst BASE_DELAY_MS = 50;\nconst MAX_RETRIES = 5;\n\n/**\n * This class automatically instruments navigation timing within the browser.\n */\nexport class NavigationTimingInstrumentation extends InstrumentationBase<NavigationTimingInstrumentationConfig> {\n private _lastEntry?: PerformanceNavigationTiming;\n private _completeDelayTimeoutId?: number;\n private _retryCount = 0;\n private _didEmit = false;\n\n // Use `declare` to prevent JS class field initializers from running after\n // super(), which would reset values set by the enable() call that\n // InstrumentationBase makes during its constructor.\n private declare _isEnabled: boolean;\n private declare _onLoad: () => void;\n private declare _onPageHide: () => void;\n\n constructor(config: NavigationTimingInstrumentationConfig = {}) {\n super(\n '@opentelemetry/browser-instrumentation/navigation-timing',\n version,\n config,\n );\n }\n\n protected override init() {\n return [];\n }\n\n override enable(): void {\n if (this._isEnabled) {\n return;\n }\n this._isEnabled = true;\n this._onLoad = () => this._tryEmitOrSchedule();\n this._onPageHide = () => this._handleUnload();\n\n // Try emitting immediately (e.g. when enabled after load),\n // otherwise schedule for `load` or fall back to unload.\n this._tryEmitOrSchedule();\n if (this._didEmit) {\n return;\n }\n\n window.addEventListener('pagehide', this._onPageHide);\n }\n\n override disable(): void {\n this._isEnabled = false;\n this._unsubscribeAll();\n this._lastEntry = undefined;\n this._didEmit = false;\n this._retryCount = 0;\n }\n\n private _getLatestNavigationEntry(): PerformanceNavigationTiming | undefined {\n const entries = performance?.getEntriesByType?.('navigation') as\n | PerformanceNavigationTiming[]\n | undefined;\n if (!entries || entries.length === 0) {\n return;\n }\n\n return entries[entries.length - 1];\n }\n\n private _calculateBackoffDelay(): number {\n return this._retryCount * BASE_DELAY_MS;\n }\n\n /**\n * Attempts to emit the navigation timing event.\n *\n * - Emits immediately if a complete `PerformanceNavigationTiming` entry is available.\n * - If the page is still loading, waits for `window.load` and retries.\n * - If the page is already loaded but the entry is not finalized yet, schedules one\n * deferred re-check (to allow the browser to populate the timing fields).\n *\n * This method can be called multiple times (from `enable()`, the load handler, or the\n * deferred timeout), so it must be safe to re-enter.\n */\n private _tryEmitOrSchedule(): void {\n if (this._didEmit) {\n return;\n }\n\n const entry = this._getLatestNavigationEntry();\n if (entry) {\n this._lastEntry = entry;\n }\n\n // Prefer emitting a \"complete\" navigation entry.\n if (entry && entry.loadEventEnd > 0) {\n this._emitAndCleanup(entry);\n return;\n }\n\n // If the document is still loading, wait for `load` and try again.\n if (document.readyState !== 'complete') {\n window.addEventListener('load', this._onLoad, { once: true });\n return;\n }\n\n // If the document is already complete but navigation timings are not finalized yet,\n // schedule a deferred re-check with linear backoff to allow the browser to finish\n // populating the entry.\n if (this._completeDelayTimeoutId !== undefined) {\n return;\n }\n if (this._retryCount > MAX_RETRIES) {\n if (this._lastEntry) {\n this._diag.warn(\n 'Navigation timing: retries exhausted, emitting incomplete entry',\n );\n this._emitAndCleanup(this._lastEntry);\n } else {\n this._diag.warn(\n 'Navigation timing: retries exhausted with no entry available',\n );\n this._unsubscribeAll();\n }\n return;\n }\n\n const delay = this._calculateBackoffDelay();\n this._retryCount++;\n\n this._completeDelayTimeoutId = window.setTimeout(() => {\n this._completeDelayTimeoutId = undefined;\n this._tryEmitOrSchedule();\n }, delay);\n }\n\n private _handleUnload(): void {\n if (this._didEmit) {\n return;\n }\n\n const entry = this._getLatestNavigationEntry() ?? this._lastEntry;\n if (entry) {\n this._emitAndCleanup(entry);\n } else {\n this._diag.warn('Navigation timing: no entry available at unload');\n this._unsubscribeAll();\n }\n }\n\n private _emitAndCleanup(entry: PerformanceNavigationTiming): void {\n if (this._didEmit) {\n return;\n }\n\n this._didEmit = true;\n\n this._emitNavigationTiming(entry);\n this._lastEntry = undefined;\n this._unsubscribeAll();\n }\n\n private _emitNavigationTiming(entry: PerformanceNavigationTiming) {\n if (!entry) {\n return;\n }\n\n this.logger.emit({\n eventName: NAVIGATION_TIMING_EVENT_NAME,\n severityNumber: SeverityNumber.INFO,\n attributes: {\n [ATTR_NAVIGATION_TYPE]: entry.type,\n [ATTR_NAVIGATION_URL]: entry.name,\n [ATTR_NAVIGATION_DURATION]: entry.duration,\n [ATTR_NAVIGATION_DOM_COMPLETE]: entry.domComplete,\n [ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_END]:\n entry.domContentLoadedEventEnd,\n [ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_START]:\n entry.domContentLoadedEventStart,\n [ATTR_NAVIGATION_DOM_INTERACTIVE]: entry.domInteractive,\n [ATTR_NAVIGATION_LOAD_EVENT_END]: entry.loadEventEnd,\n [ATTR_NAVIGATION_LOAD_EVENT_START]: entry.loadEventStart,\n [ATTR_NAVIGATION_REDIRECT_COUNT]: entry.redirectCount,\n [ATTR_NAVIGATION_UNLOAD_EVENT_END]: entry.unloadEventEnd,\n [ATTR_NAVIGATION_UNLOAD_EVENT_START]: entry.unloadEventStart,\n [ATTR_NAVIGATION_FETCH_START]: entry.fetchStart,\n [ATTR_NAVIGATION_DOMAIN_LOOKUP_START]: entry.domainLookupStart,\n [ATTR_NAVIGATION_DOMAIN_LOOKUP_END]: entry.domainLookupEnd,\n [ATTR_NAVIGATION_CONNECT_START]: entry.connectStart,\n [ATTR_NAVIGATION_CONNECT_END]: entry.connectEnd,\n [ATTR_NAVIGATION_SECURE_CONNECTION_START]: entry.secureConnectionStart,\n [ATTR_NAVIGATION_REQUEST_START]: entry.requestStart,\n [ATTR_NAVIGATION_RESPONSE_START]: entry.responseStart,\n [ATTR_NAVIGATION_RESPONSE_END]: entry.responseEnd,\n [ATTR_NAVIGATION_TRANSFER_SIZE]: entry.transferSize,\n [ATTR_NAVIGATION_ENCODED_BODY_SIZE]: entry.encodedBodySize,\n [ATTR_NAVIGATION_DECODED_BODY_SIZE]: entry.decodedBodySize,\n },\n });\n }\n\n private _unsubscribeAll(): void {\n if (this._completeDelayTimeoutId) {\n clearTimeout(this._completeDelayTimeoutId);\n this._completeDelayTimeoutId = undefined;\n }\n\n if (this._onLoad) {\n window.removeEventListener('load', this._onLoad);\n }\n if (this._onPageHide) {\n window.removeEventListener('pagehide', this._onPageHide);\n }\n }\n}\n"],"mappings":";;;;;AAqCA,MAAM,gBAAgB;AACtB,MAAM,cAAc;;;;AAKpB,IAAa,kCAAb,cAAqD,oBAA2D;CAC9G;CACA;CACA,cAAsB;CACtB,WAAmB;CASnB,YAAY,SAAgD,EAAE,EAAE;AAC9D,QACE,4DACA,SACA,OACD;;CAGH,OAA0B;AACxB,SAAO,EAAE;;CAGX,SAAwB;AACtB,MAAI,KAAK,WACP;AAEF,OAAK,aAAa;AAClB,OAAK,gBAAgB,KAAK,oBAAoB;AAC9C,OAAK,oBAAoB,KAAK,eAAe;AAI7C,OAAK,oBAAoB;AACzB,MAAI,KAAK,SACP;AAGF,SAAO,iBAAiB,YAAY,KAAK,YAAY;;CAGvD,UAAyB;AACvB,OAAK,aAAa;AAClB,OAAK,iBAAiB;AACtB,OAAK,aAAa,KAAA;AAClB,OAAK,WAAW;AAChB,OAAK,cAAc;;CAGrB,4BAA6E;EAC3E,MAAM,UAAU,aAAa,mBAAmB,aAAa;AAG7D,MAAI,CAAC,WAAW,QAAQ,WAAW,EACjC;AAGF,SAAO,QAAQ,QAAQ,SAAS;;CAGlC,yBAAyC;AACvC,SAAO,KAAK,cAAc;;;;;;;;;;;;;CAc5B,qBAAmC;AACjC,MAAI,KAAK,SACP;EAGF,MAAM,QAAQ,KAAK,2BAA2B;AAC9C,MAAI,MACF,MAAK,aAAa;AAIpB,MAAI,SAAS,MAAM,eAAe,GAAG;AACnC,QAAK,gBAAgB,MAAM;AAC3B;;AAIF,MAAI,SAAS,eAAe,YAAY;AACtC,UAAO,iBAAiB,QAAQ,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;AAC7D;;AAMF,MAAI,KAAK,4BAA4B,KAAA,EACnC;AAEF,MAAI,KAAK,cAAc,aAAa;AAClC,OAAI,KAAK,YAAY;AACnB,SAAK,MAAM,KACT,kEACD;AACD,SAAK,gBAAgB,KAAK,WAAW;UAChC;AACL,SAAK,MAAM,KACT,+DACD;AACD,SAAK,iBAAiB;;AAExB;;EAGF,MAAM,QAAQ,KAAK,wBAAwB;AAC3C,OAAK;AAEL,OAAK,0BAA0B,OAAO,iBAAiB;AACrD,QAAK,0BAA0B,KAAA;AAC/B,QAAK,oBAAoB;KACxB,MAAM;;CAGX,gBAA8B;AAC5B,MAAI,KAAK,SACP;EAGF,MAAM,QAAQ,KAAK,2BAA2B,IAAI,KAAK;AACvD,MAAI,MACF,MAAK,gBAAgB,MAAM;OACtB;AACL,QAAK,MAAM,KAAK,kDAAkD;AAClE,QAAK,iBAAiB;;;CAI1B,gBAAwB,OAA0C;AAChE,MAAI,KAAK,SACP;AAGF,OAAK,WAAW;AAEhB,OAAK,sBAAsB,MAAM;AACjC,OAAK,aAAa,KAAA;AAClB,OAAK,iBAAiB;;CAGxB,sBAA8B,OAAoC;AAChE,MAAI,CAAC,MACH;AAGF,OAAK,OAAO,KAAK;GACf,WAAW;GACX,gBAAgB,eAAe;GAC/B,YAAY;KACT,uBAAuB,MAAM;KAC7B,sBAAsB,MAAM;KAC5B,2BAA2B,MAAM;KACjC,+BAA+B,MAAM;KACrC,+CACC,MAAM;KACP,iDACC,MAAM;KACP,kCAAkC,MAAM;KACxC,iCAAiC,MAAM;KACvC,mCAAmC,MAAM;KACzC,iCAAiC,MAAM;KACvC,mCAAmC,MAAM;KACzC,qCAAqC,MAAM;KAC3C,8BAA8B,MAAM;KACpC,sCAAsC,MAAM;KAC5C,oCAAoC,MAAM;KAC1C,gCAAgC,MAAM;KACtC,8BAA8B,MAAM;KACpC,0CAA0C,MAAM;KAChD,gCAAgC,MAAM;KACtC,iCAAiC,MAAM;KACvC,+BAA+B,MAAM;KACrC,gCAAgC,MAAM;KACtC,oCAAoC,MAAM;KAC1C,oCAAoC,MAAM;IAC5C;GACF,CAAC;;CAGJ,kBAAgC;AAC9B,MAAI,KAAK,yBAAyB;AAChC,gBAAa,KAAK,wBAAwB;AAC1C,QAAK,0BAA0B,KAAA;;AAGjC,MAAI,KAAK,QACP,QAAO,oBAAoB,QAAQ,KAAK,QAAQ;AAElD,MAAI,KAAK,YACP,QAAO,oBAAoB,YAAY,KAAK,YAAY"}
@@ -3,99 +3,99 @@ const NAVIGATION_TIMING_EVENT_NAME = "browser.navigation_timing";
3
3
  /**
4
4
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
5
5
  */
6
- const ATTR_NAVIGATION_TYPE = "navigation.type";
6
+ const ATTR_NAVIGATION_TYPE = "browser.navigation_timing.type";
7
7
  /**
8
8
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
9
9
  */
10
- const ATTR_NAVIGATION_URL = "navigation.url";
10
+ const ATTR_NAVIGATION_URL = "url.full";
11
11
  /**
12
12
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
13
13
  */
14
- const ATTR_NAVIGATION_DURATION = "navigation.duration";
14
+ const ATTR_NAVIGATION_DOM_COMPLETE = "browser.navigation_timing.dom_complete";
15
15
  /**
16
16
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
17
17
  */
18
- const ATTR_NAVIGATION_DOM_COMPLETE = "navigation.dom_complete";
18
+ const ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_END = "browser.navigation_timing.dom_content_loaded_event_end";
19
19
  /**
20
20
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
21
21
  */
22
- const ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_END = "navigation.dom_content_loaded_event_end";
22
+ const ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_START = "browser.navigation_timing.dom_content_loaded_event_start";
23
23
  /**
24
24
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
25
25
  */
26
- const ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_START = "navigation.dom_content_loaded_event_start";
26
+ const ATTR_NAVIGATION_DOM_INTERACTIVE = "browser.navigation_timing.dom_interactive";
27
27
  /**
28
28
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
29
29
  */
30
- const ATTR_NAVIGATION_DOM_INTERACTIVE = "navigation.dom_interactive";
30
+ const ATTR_NAVIGATION_LOAD_EVENT_END = "browser.navigation_timing.load_event_end";
31
31
  /**
32
32
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
33
33
  */
34
- const ATTR_NAVIGATION_LOAD_EVENT_END = "navigation.load_event_end";
34
+ const ATTR_NAVIGATION_LOAD_EVENT_START = "browser.navigation_timing.load_event_start";
35
35
  /**
36
36
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
37
37
  */
38
- const ATTR_NAVIGATION_LOAD_EVENT_START = "navigation.load_event_start";
38
+ const ATTR_NAVIGATION_REDIRECT_COUNT = "browser.navigation_timing.redirect_count";
39
39
  /**
40
40
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
41
41
  */
42
- const ATTR_NAVIGATION_REDIRECT_COUNT = "navigation.redirect_count";
42
+ const ATTR_NAVIGATION_UNLOAD_EVENT_END = "browser.navigation_timing.unload_event_end";
43
43
  /**
44
44
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
45
45
  */
46
- const ATTR_NAVIGATION_UNLOAD_EVENT_END = "navigation.unload_event_end";
46
+ const ATTR_NAVIGATION_UNLOAD_EVENT_START = "browser.navigation_timing.unload_event_start";
47
47
  /**
48
48
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
49
49
  */
50
- const ATTR_NAVIGATION_UNLOAD_EVENT_START = "navigation.unload_event_start";
50
+ const ATTR_NAVIGATION_DURATION = "browser.resource_timing.duration";
51
51
  /**
52
52
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
53
53
  */
54
- const ATTR_NAVIGATION_FETCH_START = "navigation.fetch_start";
54
+ const ATTR_NAVIGATION_FETCH_START = "browser.resource_timing.fetch_start";
55
55
  /**
56
56
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
57
57
  */
58
- const ATTR_NAVIGATION_DOMAIN_LOOKUP_START = "navigation.domain_lookup_start";
58
+ const ATTR_NAVIGATION_DOMAIN_LOOKUP_START = "browser.resource_timing.domain_lookup_start";
59
59
  /**
60
60
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
61
61
  */
62
- const ATTR_NAVIGATION_DOMAIN_LOOKUP_END = "navigation.domain_lookup_end";
62
+ const ATTR_NAVIGATION_DOMAIN_LOOKUP_END = "browser.resource_timing.domain_lookup_end";
63
63
  /**
64
64
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
65
65
  */
66
- const ATTR_NAVIGATION_CONNECT_START = "navigation.connect_start";
66
+ const ATTR_NAVIGATION_CONNECT_START = "browser.resource_timing.connect_start";
67
67
  /**
68
68
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
69
69
  */
70
- const ATTR_NAVIGATION_CONNECT_END = "navigation.connect_end";
70
+ const ATTR_NAVIGATION_CONNECT_END = "browser.resource_timing.connect_end";
71
71
  /**
72
72
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
73
73
  */
74
- const ATTR_NAVIGATION_SECURE_CONNECTION_START = "navigation.secure_connection_start";
74
+ const ATTR_NAVIGATION_SECURE_CONNECTION_START = "browser.resource_timing.secure_connection_start";
75
75
  /**
76
76
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
77
77
  */
78
- const ATTR_NAVIGATION_REQUEST_START = "navigation.request_start";
78
+ const ATTR_NAVIGATION_REQUEST_START = "browser.resource_timing.request_start";
79
79
  /**
80
80
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
81
81
  */
82
- const ATTR_NAVIGATION_RESPONSE_START = "navigation.response_start";
82
+ const ATTR_NAVIGATION_RESPONSE_START = "browser.resource_timing.response_start";
83
83
  /**
84
84
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
85
85
  */
86
- const ATTR_NAVIGATION_RESPONSE_END = "navigation.response_end";
86
+ const ATTR_NAVIGATION_RESPONSE_END = "browser.resource_timing.response_end";
87
87
  /**
88
88
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
89
89
  */
90
- const ATTR_NAVIGATION_TRANSFER_SIZE = "navigation.transfer_size";
90
+ const ATTR_NAVIGATION_TRANSFER_SIZE = "browser.resource_timing.transfer_size";
91
91
  /**
92
92
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
93
93
  */
94
- const ATTR_NAVIGATION_ENCODED_BODY_SIZE = "navigation.encoded_body_size";
94
+ const ATTR_NAVIGATION_ENCODED_BODY_SIZE = "browser.resource_timing.encoded_body_size";
95
95
  /**
96
96
  * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
97
97
  */
98
- const ATTR_NAVIGATION_DECODED_BODY_SIZE = "navigation.decoded_body_size";
98
+ const ATTR_NAVIGATION_DECODED_BODY_SIZE = "browser.resource_timing.decoded_body_size";
99
99
  //#endregion
100
100
  export { ATTR_NAVIGATION_CONNECT_END, ATTR_NAVIGATION_CONNECT_START, ATTR_NAVIGATION_DECODED_BODY_SIZE, ATTR_NAVIGATION_DOMAIN_LOOKUP_END, ATTR_NAVIGATION_DOMAIN_LOOKUP_START, ATTR_NAVIGATION_DOM_COMPLETE, ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_END, ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_START, ATTR_NAVIGATION_DOM_INTERACTIVE, ATTR_NAVIGATION_DURATION, ATTR_NAVIGATION_ENCODED_BODY_SIZE, ATTR_NAVIGATION_FETCH_START, ATTR_NAVIGATION_LOAD_EVENT_END, ATTR_NAVIGATION_LOAD_EVENT_START, ATTR_NAVIGATION_REDIRECT_COUNT, ATTR_NAVIGATION_REQUEST_START, ATTR_NAVIGATION_RESPONSE_END, ATTR_NAVIGATION_RESPONSE_START, ATTR_NAVIGATION_SECURE_CONNECTION_START, ATTR_NAVIGATION_TRANSFER_SIZE, ATTR_NAVIGATION_TYPE, ATTR_NAVIGATION_UNLOAD_EVENT_END, ATTR_NAVIGATION_UNLOAD_EVENT_START, ATTR_NAVIGATION_URL, NAVIGATION_TIMING_EVENT_NAME };
101
101
 
@@ -1 +1 @@
1
- {"version":3,"file":"semconv.js","names":[],"sources":["../../src/navigation-timing/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\nexport const NAVIGATION_TIMING_EVENT_NAME = 'browser.navigation_timing';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_TYPE = 'navigation.type';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_URL = 'navigation.url';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DURATION = 'navigation.duration';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DOM_COMPLETE = 'navigation.dom_complete';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_END =\n 'navigation.dom_content_loaded_event_end';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_START =\n 'navigation.dom_content_loaded_event_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DOM_INTERACTIVE = 'navigation.dom_interactive';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_LOAD_EVENT_END = 'navigation.load_event_end';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_LOAD_EVENT_START = 'navigation.load_event_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_REDIRECT_COUNT = 'navigation.redirect_count';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_UNLOAD_EVENT_END = 'navigation.unload_event_end';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_UNLOAD_EVENT_START =\n 'navigation.unload_event_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_FETCH_START = 'navigation.fetch_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DOMAIN_LOOKUP_START =\n 'navigation.domain_lookup_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DOMAIN_LOOKUP_END = 'navigation.domain_lookup_end';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_CONNECT_START = 'navigation.connect_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_CONNECT_END = 'navigation.connect_end';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_SECURE_CONNECTION_START =\n 'navigation.secure_connection_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_REQUEST_START = 'navigation.request_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_RESPONSE_START = 'navigation.response_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_RESPONSE_END = 'navigation.response_end';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_TRANSFER_SIZE = 'navigation.transfer_size';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_ENCODED_BODY_SIZE = 'navigation.encoded_body_size';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DECODED_BODY_SIZE = 'navigation.decoded_body_size';\n"],"mappings":";AAWA,MAAa,+BAA+B;;;;AAK5C,MAAa,uBAAuB;;;;AAKpC,MAAa,sBAAsB;;;;AAKnC,MAAa,2BAA2B;;;;AAKxC,MAAa,+BAA+B;;;;AAK5C,MAAa,+CACX;;;;AAKF,MAAa,iDACX;;;;AAKF,MAAa,kCAAkC;;;;AAK/C,MAAa,iCAAiC;;;;AAK9C,MAAa,mCAAmC;;;;AAKhD,MAAa,iCAAiC;;;;AAK9C,MAAa,mCAAmC;;;;AAKhD,MAAa,qCACX;;;;AAKF,MAAa,8BAA8B;;;;AAK3C,MAAa,sCACX;;;;AAKF,MAAa,oCAAoC;;;;AAKjD,MAAa,gCAAgC;;;;AAK7C,MAAa,8BAA8B;;;;AAK3C,MAAa,0CACX;;;;AAKF,MAAa,gCAAgC;;;;AAK7C,MAAa,iCAAiC;;;;AAK9C,MAAa,+BAA+B;;;;AAK5C,MAAa,gCAAgC;;;;AAK7C,MAAa,oCAAoC;;;;AAKjD,MAAa,oCAAoC"}
1
+ {"version":3,"file":"semconv.js","names":[],"sources":["../../src/navigation-timing/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\nexport const NAVIGATION_TIMING_EVENT_NAME = 'browser.navigation_timing';\n\n// Navigation-specific attributes (from PerformanceNavigationTiming).\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_TYPE = 'browser.navigation_timing.type';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_URL = 'url.full';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DOM_COMPLETE =\n 'browser.navigation_timing.dom_complete';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_END =\n 'browser.navigation_timing.dom_content_loaded_event_end';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DOM_CONTENT_LOADED_EVENT_START =\n 'browser.navigation_timing.dom_content_loaded_event_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DOM_INTERACTIVE =\n 'browser.navigation_timing.dom_interactive';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_LOAD_EVENT_END =\n 'browser.navigation_timing.load_event_end';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_LOAD_EVENT_START =\n 'browser.navigation_timing.load_event_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_REDIRECT_COUNT =\n 'browser.navigation_timing.redirect_count';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_UNLOAD_EVENT_END =\n 'browser.navigation_timing.unload_event_end';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_UNLOAD_EVENT_START =\n 'browser.navigation_timing.unload_event_start';\n\n// Shared timing attributes inherited from PerformanceResourceTiming.\n// PerformanceNavigationTiming extends PerformanceResourceTiming, so these\n// values mirror resource timing. TODO: extract to a shared module to avoid\n// duplication.\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DURATION = 'browser.resource_timing.duration';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_FETCH_START =\n 'browser.resource_timing.fetch_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DOMAIN_LOOKUP_START =\n 'browser.resource_timing.domain_lookup_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DOMAIN_LOOKUP_END =\n 'browser.resource_timing.domain_lookup_end';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_CONNECT_START =\n 'browser.resource_timing.connect_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_CONNECT_END =\n 'browser.resource_timing.connect_end';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_SECURE_CONNECTION_START =\n 'browser.resource_timing.secure_connection_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_REQUEST_START =\n 'browser.resource_timing.request_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_RESPONSE_START =\n 'browser.resource_timing.response_start';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_RESPONSE_END =\n 'browser.resource_timing.response_end';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_TRANSFER_SIZE =\n 'browser.resource_timing.transfer_size';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_ENCODED_BODY_SIZE =\n 'browser.resource_timing.encoded_body_size';\n\n/**\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_NAVIGATION_DECODED_BODY_SIZE =\n 'browser.resource_timing.decoded_body_size';\n"],"mappings":";AAWA,MAAa,+BAA+B;;;;AAO5C,MAAa,uBAAuB;;;;AAKpC,MAAa,sBAAsB;;;;AAKnC,MAAa,+BACX;;;;AAKF,MAAa,+CACX;;;;AAKF,MAAa,iDACX;;;;AAKF,MAAa,kCACX;;;;AAKF,MAAa,iCACX;;;;AAKF,MAAa,mCACX;;;;AAKF,MAAa,iCACX;;;;AAKF,MAAa,mCACX;;;;AAKF,MAAa,qCACX;;;;AAUF,MAAa,2BAA2B;;;;AAKxC,MAAa,8BACX;;;;AAKF,MAAa,sCACX;;;;AAKF,MAAa,oCACX;;;;AAKF,MAAa,gCACX;;;;AAKF,MAAa,8BACX;;;;AAKF,MAAa,0CACX;;;;AAKF,MAAa,gCACX;;;;AAKF,MAAa,iCACX;;;;AAKF,MAAa,+BACX;;;;AAKF,MAAa,gCACX;;;;AAKF,MAAa,oCACX;;;;AAKF,MAAa,oCACX"}
@@ -0,0 +1,6 @@
1
+ //#region package.json
2
+ var version = "0.3.0";
3
+ //#endregion
4
+ export { version };
5
+
6
+ //# sourceMappingURL=package.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}