@opentelemetry/browser-instrumentation 0.7.0 → 0.8.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.
@@ -0,0 +1,23 @@
1
+ import { Span } from "@opentelemetry/api";
2
+ import { InstrumentationConfig } from "@opentelemetry/instrumentation";
3
+ //#region src/xhr/types.d.ts
4
+ type XhrCustomAttributeFunction = (span: Span, xhr: XMLHttpRequest) => void;
5
+ interface XhrInstrumentationConfig extends InstrumentationConfig {
6
+ /** URLs which should include trace headers when origin doesn't match */
7
+ propagateTraceHeaderCorsUrls?: Array<string | RegExp>;
8
+ /**
9
+ * URLs that partially match any regex in ignoreUrls will not be traced.
10
+ * In addition, URLs that are _exact matches_ of strings in ignoreUrls will
11
+ * also not be traced.
12
+ */
13
+ ignoreUrls?: Array<string | RegExp>;
14
+ /** Function for adding custom attributes on the span */
15
+ applyCustomAttributesOnSpan?: XhrCustomAttributeFunction;
16
+ /** Measure outgoing request size */
17
+ measureRequestSize?: boolean;
18
+ /** Custom function to sanitize URLs before adding to log records. */
19
+ sanitizeUrl?: (url: string) => string;
20
+ }
21
+ //#endregion
22
+ export { XhrInstrumentationConfig };
23
+ //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/browser-instrumentation",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "OpenTelemetry browser instrumentations.",
5
5
  "keywords": [
6
6
  "opentelemetry",
@@ -13,7 +13,9 @@
13
13
  "navigation-timing",
14
14
  "resource-timing",
15
15
  "user-action",
16
- "web-vitals"
16
+ "web-vitals",
17
+ "fetch",
18
+ "xhr"
17
19
  ],
18
20
  "homepage": "https://github.com/open-telemetry/opentelemetry-browser",
19
21
  "bugs": "https://github.com/open-telemetry/opentelemetry-browser/issues",
@@ -36,7 +38,9 @@
36
38
  "./experimental/navigation-timing": "./dist/navigation-timing/index.js",
37
39
  "./experimental/resource-timing": "./dist/resource-timing/index.js",
38
40
  "./experimental/user-action": "./dist/user-action/index.js",
39
- "./experimental/web-vitals": "./dist/web-vitals/index.js"
41
+ "./experimental/web-vitals": "./dist/web-vitals/index.js",
42
+ "./experimental/fetch": "./dist/fetch/index.js",
43
+ "./experimental/xhr": "./dist/xhr/index.js"
40
44
  },
41
45
  "sideEffects": false,
42
46
  "files": [
@@ -52,16 +56,19 @@
52
56
  },
53
57
  "dependencies": {
54
58
  "@opentelemetry/api-logs": "^0.221.0",
55
- "@opentelemetry/core": "^2.10.0",
56
59
  "@opentelemetry/instrumentation": "^0.221.0",
57
60
  "@opentelemetry/semantic-conventions": "^1.43.0",
58
- "web-vitals": "^5.3.0"
61
+ "web-vitals": "^6.1.1"
59
62
  },
60
63
  "peerDependencies": {
61
64
  "@opentelemetry/api": "^1.9.1"
62
65
  },
63
66
  "devDependencies": {
64
- "@opentelemetry/sdk-logs": "0.221.0"
67
+ "@opentelemetry/core": "2.10.0",
68
+ "@opentelemetry/propagator-b3": "2.10.0",
69
+ "@opentelemetry/sdk-logs": "0.221.0",
70
+ "@opentelemetry/sdk-trace-base": "2.10.0",
71
+ "msw": "2.15.0"
65
72
  },
66
73
  "publishConfig": {
67
74
  "access": "public"