@adonisjs/otel 1.1.1 → 1.1.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.
@@ -8,7 +8,7 @@ export declare class HttpUrlFilter {
8
8
  #private;
9
9
  static readonly DEFAULT_IGNORED_URLS: string[];
10
10
  static readonly STATIC_FILE_EXTENSIONS: Set<string>;
11
- static readonly VITE_DEV_PATTERNS: string[];
11
+ static readonly DEV_SERVER_PATTERNS: string[];
12
12
  constructor(config?: HttpInstrumentationConfig);
13
13
  /**
14
14
  * Check if a request should be ignored (not traced).
@@ -12,6 +12,13 @@ export class HttpUrlFilter {
12
12
  '/readiness',
13
13
  '/metrics',
14
14
  '/internal/metrics',
15
+ '/favicon.ico',
16
+ '/robots.txt',
17
+ '/sitemap.xml',
18
+ '/manifest.json',
19
+ '/site.webmanifest',
20
+ '/browserconfig.xml',
21
+ '/ads.txt',
15
22
  ];
16
23
  static STATIC_FILE_EXTENSIONS = new Set([
17
24
  'css',
@@ -43,8 +50,11 @@ export class HttpUrlFilter {
43
50
  'pdf',
44
51
  'vue',
45
52
  'svelte',
53
+ 'webmanifest',
54
+ 'txt',
55
+ 'xml',
46
56
  ]);
47
- static VITE_DEV_PATTERNS = ['/@vite/', '/@id/', '/@fs/', '/__vite'];
57
+ static DEV_SERVER_PATTERNS = ['/@vite/', '/@id/', '/@fs/', '/__vite', '/@react-refresh'];
48
58
  #ignoredUrls;
49
59
  #ignoreStaticFiles;
50
60
  #ignoreOptionsRequests;
@@ -70,8 +80,8 @@ export class HttpUrlFilter {
70
80
  const extension = lastSegment.slice(dotIndex + 1).toLowerCase();
71
81
  return HttpUrlFilter.STATIC_FILE_EXTENSIONS.has(extension);
72
82
  }
73
- #isViteDevRequest(url) {
74
- return HttpUrlFilter.VITE_DEV_PATTERNS.some((pattern) => url.startsWith(pattern));
83
+ #isDevServerRequest(url) {
84
+ return HttpUrlFilter.DEV_SERVER_PATTERNS.some((pattern) => url.startsWith(pattern));
75
85
  }
76
86
  #matchesPattern(urlPath, pattern) {
77
87
  if (pattern.endsWith('/*')) {
@@ -101,8 +111,8 @@ export class HttpUrlFilter {
101
111
  debug('ignoring request "%s %s" (reason: static file)', method, urlPath);
102
112
  return true;
103
113
  }
104
- if (this.#ignoreStaticFiles && this.#isViteDevRequest(urlPath)) {
105
- debug('ignoring request "%s %s" (reason: vite dev pattern)', method, urlPath);
114
+ if (this.#ignoreStaticFiles && this.#isDevServerRequest(urlPath)) {
115
+ debug('ignoring request "%s %s" (reason: dev server pattern)', method, urlPath);
106
116
  return true;
107
117
  }
108
118
  if (this.#ignoredUrls.some((pattern) => this.#matchesPattern(urlPath, pattern))) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adonisjs/otel",
3
3
  "description": "OpenTelemetry integration for AdonisJS with sensible defaults and zero-config setup",
4
- "version": "1.1.1",
4
+ "version": "1.1.3",
5
5
  "engines": {
6
6
  "node": ">=20.6.0"
7
7
  },
@@ -105,7 +105,7 @@
105
105
  "typescript": "^5.9.3"
106
106
  },
107
107
  "peerDependencies": {
108
- "@adonisjs/core": "^6.2.0 || ^7.0.0"
108
+ "@adonisjs/core": "^6.2.0 || ^7.0.0 || ^7.0.0-next.27"
109
109
  },
110
110
  "publishConfig": {
111
111
  "provenance": true,