@0xchain/telemetry 1.1.0-beta.13 → 1.1.0-beta.14

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.
@@ -1,16 +1,32 @@
1
- const d = [
1
+ const x = [
2
+ // 健康检查 & 监控
2
3
  "/health",
3
4
  "/api/health",
4
5
  "/metrics",
6
+ "/api/metrics",
5
7
  "/readyz",
6
8
  "/livez",
9
+ "/monitoring",
10
+ // Next.js 内部路由
11
+ "/_next",
12
+ "/__nextjs_",
13
+ // Next.js App Router 元数据路由
14
+ "/opengraph-image",
15
+ "/twitter-image",
16
+ "/icon",
17
+ "/apple-icon",
18
+ // Vercel 内部路由
19
+ "/_vercel",
20
+ // 静态资源 & SEO
7
21
  "/favicon.ico",
8
22
  "/robots.txt",
9
23
  "/sitemap.xml",
10
- "/_next",
11
- "/__nextjs_",
12
- "/.well-known"
13
- ], m = [
24
+ "/manifest.json",
25
+ "/manifest.webmanifest",
26
+ "/.well-known",
27
+ // 认证回调(NextAuth.js)
28
+ "/api/auth"
29
+ ], d = [
14
30
  ".css",
15
31
  ".js",
16
32
  ".mjs",
@@ -30,9 +46,9 @@ const d = [
30
46
  ".map",
31
47
  ".txt",
32
48
  ".xml"
33
- ], i = {
34
- paths: d,
35
- extensions: m,
49
+ ], h = {
50
+ paths: x,
51
+ extensions: d,
36
52
  methods: ["HEAD", "OPTIONS"]
37
53
  }, f = (e) => e.map((s) => {
38
54
  const t = s.trim().toLowerCase();
@@ -54,27 +70,27 @@ const d = [
54
70
  var a;
55
71
  if (!e) return "default";
56
72
  if ((a = e.paths) == null ? void 0 : a.some((n) => n instanceof RegExp)) return null;
57
- const t = (e.paths ?? []).map(String).sort().join(","), o = (e.extensions ?? []).map((n) => n.toLowerCase()).sort().join(","), h = (e.methods ?? []).map((n) => n.toUpperCase()).sort().join(",");
58
- return `p:${t}|e:${o}|m:${h}`;
59
- }, c = /* @__PURE__ */ new Map(), $ = 16, I = (e) => {
60
- var n, l, p;
73
+ const t = (e.paths ?? []).map(String).sort().join(","), o = (e.extensions ?? []).map((n) => n.toLowerCase()).sort().join(","), c = (e.methods ?? []).map((n) => n.toUpperCase()).sort().join(",");
74
+ return `p:${t}|e:${o}|m:${c}`;
75
+ }, i = /* @__PURE__ */ new Map(), g = 16, $ = (e) => {
76
+ var n, p, l;
61
77
  const s = j(e);
62
78
  if (s) {
63
- const r = c.get(s);
79
+ const r = i.get(s);
64
80
  if (r) return r;
65
81
  }
66
- const t = (n = e == null ? void 0 : e.paths) != null && n.length ? e.paths : i.paths, o = (l = e == null ? void 0 : e.extensions) != null && l.length ? f(e.extensions) : i.extensions, h = (p = e == null ? void 0 : e.methods) != null && p.length ? e.methods.map((r) => r.toUpperCase()) : i.methods, a = (r, u) => u && h.includes(u.toUpperCase()) ? !0 : r ? E(o, r) ? !0 : t.some((x) => C(x, r)) : !1;
82
+ const t = (n = e == null ? void 0 : e.paths) != null && n.length ? e.paths : h.paths, o = (p = e == null ? void 0 : e.extensions) != null && p.length ? f(e.extensions) : h.extensions, c = (l = e == null ? void 0 : e.methods) != null && l.length ? e.methods.map((r) => r.toUpperCase()) : h.methods, a = (r, u) => u && c.includes(u.toUpperCase()) ? !0 : r ? E(o, r) ? !0 : t.some((m) => C(m, r)) : !1;
67
83
  if (s) {
68
- if (c.size >= $) {
69
- const r = c.keys().next().value;
70
- r && c.delete(r);
84
+ if (i.size >= g) {
85
+ const r = i.keys().next().value;
86
+ r && i.delete(r);
71
87
  }
72
- c.set(s, a);
88
+ i.set(s, a);
73
89
  }
74
90
  return a;
75
91
  };
76
92
  export {
77
- I as c,
78
- i as d,
93
+ $ as c,
94
+ h as d,
79
95
  C as m
80
96
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../src/ignore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAsCzD,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,YAAY,CAItD,CAAC;AAcF,iBAAiB;AACjB,eAAO,MAAM,kBAAkB,GAAI,SAAS,WAAW,EAAE,UAAU,MAAM,YAmBxE,CAAC;AAsBF,+BAA+B;AAC/B,eAAO,MAAM,mBAAmB,GAAI,SAAS,YAAY,gBAJT,MAAM,WAAW,MAAM,KAAK,OAsC3E,CAAC"}
1
+ {"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../src/ignore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA2DzD,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,YAAY,CAItD,CAAC;AAcF,iBAAiB;AACjB,eAAO,MAAM,kBAAkB,GAAI,SAAS,WAAW,EAAE,UAAU,MAAM,YAmBxE,CAAC;AAsBF,+BAA+B;AAC/B,eAAO,MAAM,mBAAmB,GAAI,SAAS,YAAY,gBAJT,MAAM,WAAW,MAAM,KAAK,OAsC3E,CAAC"}
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import { trace as z, TraceFlags as M, propagation as I, context as V, SpanStatus
7
7
  import { readFile as k } from "node:fs/promises";
8
8
  import { HttpInstrumentation as j } from "@opentelemetry/instrumentation-http";
9
9
  import { UndiciInstrumentation as Q } from "@opentelemetry/instrumentation-undici";
10
- import { c as X, m as $, d as W } from "./ignore-B1KXtl12.js";
10
+ import { c as X, m as $, d as W } from "./ignore-C99NegwV.js";
11
11
  const J = "deployment.environment.name", f = (t, e) => {
12
12
  if (!t) return;
13
13
  const r = t[e.toLowerCase()];
@@ -1,5 +1,5 @@
1
1
  import { NextRequest as w, NextResponse as i } from "next/server";
2
- import { c as g } from "./ignore-B1KXtl12.js";
2
+ import { c as g } from "./ignore-C99NegwV.js";
3
3
  const h = {
4
4
  matcher: [
5
5
  "/((?!_next/static|_next/image|favicon.ico|robots.txt|sitemap.xml|.*\\.(?:css|js|mjs|cjs|png|jpg|jpeg|gif|svg|ico|webp|avif|woff|woff2|ttf|eot|map|txt|xml)).*)"
package/dist/next.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { NextRequest as w, NextResponse as i } from "next/server";
2
- import { c as g } from "./ignore-B1KXtl12.js";
2
+ import { c as g } from "./ignore-C99NegwV.js";
3
3
  const h = {
4
4
  matcher: [
5
5
  "/((?!_next/static|_next/image|favicon.ico|robots.txt|sitemap.xml|.*\\.(?:css|js|mjs|cjs|png|jpg|jpeg|gif|svg|ico|webp|avif|woff|woff2|ttf|eot|map|txt|xml)).*)"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xchain/telemetry",
3
- "version": "1.1.0-beta.13",
3
+ "version": "1.1.0-beta.14",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",