@monoscopetech/browser 0.5.1 → 0.5.3

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/dist/tracing.js CHANGED
@@ -23,7 +23,7 @@ export class OpenTelemetryManager {
23
23
  ...(resourceAttributes || {}),
24
24
  });
25
25
  const otlpExporter = new OTLPTraceExporter({
26
- url: exporterEndpoint || "https://otelcol.s.past3.tech:4318/v1/traces",
26
+ url: exporterEndpoint || "https://otelcol.apitoolkit.io/v1/traces",
27
27
  headers: {},
28
28
  });
29
29
  return new WebTracerProvider({
@@ -48,19 +48,12 @@ export class OpenTelemetryManager {
48
48
  instrumentations: [
49
49
  ...(this.config.instrumentations || []),
50
50
  new DocumentLoadInstrumentation({
51
+ ignoreNetworkEvents: !this.config.enableNetworkEvents,
51
52
  applyCustomAttributesOnSpan: {
52
53
  documentLoad: (span) => {
53
54
  span.setAttribute("session.id", this.sessionId);
54
55
  this.setUserAttributes(span);
55
56
  },
56
- documentFetch: (span) => {
57
- span.setAttribute("session.id", this.sessionId);
58
- this.setUserAttributes(span);
59
- },
60
- resourceFetch: (span) => {
61
- span.setAttribute("session.id", this.sessionId);
62
- this.setUserAttributes(span);
63
- },
64
57
  },
65
58
  }),
66
59
  new XMLHttpRequestInstrumentation({
package/dist/types.d.ts CHANGED
@@ -7,6 +7,7 @@ export type MonoscopeConfig = {
7
7
  resourceAttributes?: Record<string, string>;
8
8
  instrumentations?: any[];
9
9
  replayEventsBaseUrl?: string;
10
+ enableNetworkEvents?: boolean;
10
11
  user?: MonoscopeUser;
11
12
  };
12
13
  export type MonoscopeUser = {
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@monoscopetech/browser",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
7
7
  "unpkg": "dist/monoscope.umd.js",
8
8
  "browser": "dist/monoscope.umd.js",
9
9
  "scripts": {
10
- "build": "rollup -c",
10
+ "build": "npx tsc --build && rollup -c",
11
11
  "lint": "eslint src --ext .ts",
12
- "prePublishOnly": "npx tsc --build"
12
+ "prepublishOnly": "pnpm run build"
13
13
  },
14
14
  "dependencies": {
15
15
  "@opentelemetry/context-zone": "^2.0.1",