From b65ea19b85fa32a26c591ce0c16f9836d24ba79b Mon Sep 17 00:00:00 2001 From: zhenyi <434836402@qq.com> Date: Mon, 1 Jun 2026 22:04:09 +0800 Subject: [PATCH] chore: update config and build files --- .dockerignore | 3 - .gitignore | 2 + Cargo.lock | 239 ++++++++++++++++++++++++++++++++++++++++- Cargo.toml | 5 +- app/email/Cargo.toml | 5 +- app/gitdata/Cargo.toml | 4 +- app/gitpod/Cargo.toml | 2 +- app/gitsync/Cargo.toml | 3 +- bun.lock | 28 +++++ lib/ai/Cargo.toml | 1 + lib/api/Cargo.toml | 2 + lib/cache/Cargo.toml | 2 + lib/channel/Cargo.toml | 1 + lib/db/Cargo.toml | 2 + lib/email/Cargo.toml | 1 + lib/git/Cargo.toml | 2 + lib/migrate/Cargo.toml | 6 +- lib/queue/Cargo.toml | 1 + lib/service/Cargo.toml | 4 +- lib/storage/Cargo.toml | 2 + package.json | 2 + vite.config.ts | 8 +- 22 files changed, 309 insertions(+), 16 deletions(-) diff --git a/.dockerignore b/.dockerignore index 0506b18..71ce849 100644 --- a/.dockerignore +++ b/.dockerignore @@ -31,11 +31,8 @@ build/ !.env.example # Docker -docker/ docker-compose*.yml .dockerignore -Dockerfile* -*.Dockerfile # Documentation *.md diff --git a/.gitignore b/.gitignore index 7c3f2ec..9bbdde0 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,5 @@ temp/ *.bak *.backup *~ +chart/ConfigMap.yaml +chart/pvc \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index e551cd6..3381b43 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -349,6 +349,7 @@ dependencies = [ "tokio-stream", "tokio-util", "tracing", + "track", "uuid", ] @@ -486,6 +487,8 @@ dependencies = [ "socketio", "storage", "tokio-stream", + "tracing", + "track", "urlencoding", "utoipa", "uuid", @@ -495,12 +498,15 @@ dependencies = [ name = "app-email" version = "1.0.0" dependencies = [ + "actix-web", "anyhow", "config", "email", + "serde_json", "tokio", "tracing", - "tracing-subscriber", + "tracing-actix-web", + "track", ] [[package]] @@ -518,6 +524,7 @@ dependencies = [ "deadpool-redis", "email", "git", + "migrate", "model", "redis", "serde_json", @@ -529,7 +536,8 @@ dependencies = [ "tokio", "tonic 0.14.6", "tracing", - "tracing-subscriber", + "tracing-actix-web", + "track", "uuid", ] @@ -546,7 +554,7 @@ dependencies = [ "redis", "tokio", "tracing", - "tracing-subscriber", + "track", ] [[package]] @@ -565,7 +573,8 @@ dependencies = [ "sqlx 0.9.0", "tokio", "tracing", - "tracing-subscriber", + "tracing-actix-web", + "track", "uuid", ] @@ -1921,6 +1930,8 @@ dependencies = [ "serde", "serde_json", "tokio", + "tracing", + "track", ] [[package]] @@ -2036,6 +2047,7 @@ dependencies = [ "tokio", "tokio-util", "tracing", + "track", "uuid", ] @@ -2614,6 +2626,8 @@ dependencies = [ "sea-orm", "sqlparser", "sqlx 0.9.0", + "tracing", + "track", ] [[package]] @@ -3017,6 +3031,7 @@ dependencies = [ "serde_json", "tokio", "tracing", + "track", ] [[package]] @@ -3584,6 +3599,8 @@ dependencies = [ "tonic-prost", "tonic-prost-build", "tracing", + "tracing-actix-web", + "track", "uuid", ] @@ -6082,6 +6099,12 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" +[[package]] +name = "mutually_exclusive_features" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94e1e6445d314f972ff7395df2de295fe51b71821694f0b0e1e79c4f12c8577" + [[package]] name = "nalgebra" version = "0.34.2" @@ -6456,6 +6479,104 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "opentelemetry" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0142c63252a9e054e68a4c61a5778f7b14f576274d593f8ce883d191a099682" +dependencies = [ + "futures-core", + "futures-sink", + "js-sys", + "pin-project-lite", + "thiserror 2.0.18", + "tracing", +] + +[[package]] +name = "opentelemetry-appender-tracing" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c0080f0dc1d7c786f467cd85a4e395fcab11ee852004f39a29a18ab7c25d837" +dependencies = [ + "opentelemetry", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "opentelemetry-http" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5683015d09e2df236ef005b17f6f196f0d5f6313c4fa43a7b6a53b52776e4331" +dependencies = [ + "async-trait", + "bytes", + "http 1.4.0", + "opentelemetry", + "reqwest 0.13.3", +] + +[[package]] +name = "opentelemetry-otlp" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9966929966d17620d7c316c643ba62631826e10021409357772d5eea84f62c35" +dependencies = [ + "http 1.4.0", + "opentelemetry", + "opentelemetry-http", + "opentelemetry-proto", + "opentelemetry_sdk", + "prost 0.14.3", + "reqwest 0.13.3", + "thiserror 2.0.18", + "tonic 0.14.6", +] + +[[package]] +name = "opentelemetry-prometheus" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c0359983e7f79cf33c9abd89e5d7ddf67c46c419d0148598022d70e70c01aba" +dependencies = [ + "once_cell", + "opentelemetry", + "opentelemetry_sdk", + "prometheus 0.14.0", + "tracing", +] + +[[package]] +name = "opentelemetry-proto" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56d658ba1faf63f7b9c492cfbe6e0ec365440a16132d3270c1065f7b33f1b638" +dependencies = [ + "opentelemetry", + "opentelemetry_sdk", + "prost 0.14.3", +] + +[[package]] +name = "opentelemetry_sdk" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b59f80e1ac4d5ff7a2db8fb6c80badb7f0f3f858211fba08dd9aaec750894f9" +dependencies = [ + "futures-channel", + "futures-executor", + "futures-util", + "opentelemetry", + "percent-encoding", + "portable-atomic", + "rand 0.9.4", + "thiserror 2.0.18", + "tokio", + "tokio-stream", +] + [[package]] name = "ordered-float" version = "4.6.0" @@ -7089,6 +7210,35 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "prometheus" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot", + "protobuf", + "thiserror 1.0.69", +] + +[[package]] +name = "prometheus" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ca5326d8d0b950a9acd87e6a3f94745394f62e4dae1b1ee22b2bc0c394af43a" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot", + "thiserror 2.0.18", +] + [[package]] name = "prost" version = "0.13.5" @@ -7174,6 +7324,12 @@ dependencies = [ "prost 0.14.3", ] +[[package]] +name = "protobuf" +version = "2.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" + [[package]] name = "psm" version = "0.1.31" @@ -7274,6 +7430,7 @@ dependencies = [ "serde_json", "tokio", "tracing", + "track", ] [[package]] @@ -7755,6 +7912,7 @@ dependencies = [ "base64 0.22.1", "bytes", "encoding_rs", + "futures-channel", "futures-core", "futures-util", "h2 0.4.14", @@ -8687,6 +8845,7 @@ dependencies = [ "hkdf 0.13.0", "hmac 0.13.0", "model", + "prometheus 0.13.4", "queue", "rand 0.10.1", "rand_chacha 0.10.0", @@ -8705,6 +8864,7 @@ dependencies = [ "tokio-util", "tonic 0.14.6", "tracing", + "track", "utoipa", "uuid", ] @@ -9548,6 +9708,8 @@ dependencies = [ "serde_json", "thiserror 2.0.18", "tokio", + "tracing", + "track", ] [[package]] @@ -9591,6 +9753,12 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "symlink" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" + [[package]] name = "syn" version = "1.0.109" @@ -10044,9 +10212,11 @@ dependencies = [ "hyper-util", "percent-encoding", "pin-project", + "rustls-native-certs", "socket2 0.6.3", "sync_wrapper", "tokio", + "tokio-rustls 0.26.4", "tokio-stream", "tower 0.5.3", "tower-layer", @@ -10174,6 +10344,32 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-actix-web" +version = "0.7.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ca6b15407f9bfcb35f82d0e79e603e1629ece4e91cc6d9e58f890c184dd20af" +dependencies = [ + "actix-web", + "mutually_exclusive_features", + "pin-project", + "tracing", + "uuid", +] + +[[package]] +name = "tracing-appender" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "050686193eb999b4bb3bc2acfa891a13da00f79734704c4b8b4ef1a10b368a3c" +dependencies = [ + "crossbeam-channel", + "symlink", + "thiserror 2.0.18", + "time", + "tracing-subscriber", +] + [[package]] name = "tracing-attributes" version = "0.1.31" @@ -10218,6 +10414,22 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-opentelemetry" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adbc64cba7137545b8044cb1fe9814f7aacf3c6b5f9b45be8bb5db538befdb26" +dependencies = [ + "js-sys", + "opentelemetry", + "smallvec", + "tracing", + "tracing-core", + "tracing-log", + "tracing-subscriber", + "web-time", +] + [[package]] name = "tracing-serde" version = "0.2.0" @@ -10249,6 +10461,25 @@ dependencies = [ "tracing-serde", ] +[[package]] +name = "track" +version = "1.0.0" +dependencies = [ + "anyhow", + "config", + "opentelemetry", + "opentelemetry-appender-tracing", + "opentelemetry-otlp", + "opentelemetry-prometheus", + "opentelemetry_sdk", + "prometheus 0.13.4", + "tokio", + "tracing", + "tracing-appender", + "tracing-opentelemetry", + "tracing-subscriber", +] + [[package]] name = "transpose" version = "0.2.3" diff --git a/Cargo.toml b/Cargo.toml index 3c0c9df..a74edab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,8 @@ members = [ "lib/session", "lib/storage", "lib/parsefile", - "lib/socketio" + "lib/socketio", + "lib/track" ] resolver = "3" @@ -62,6 +63,7 @@ session = { path = "lib/session" } storage = { path = "lib/storage" } parsefile = { path = "lib/parsefile"} socketio = { path = "lib/socketio" } +track = { path = "lib/track" } leptos = "0.8.19" leptos_actix = "0.8.7" @@ -110,6 +112,7 @@ sqlparser = "0.62.0" qdrant-client = "1.18.0" tiktoken-rs = "0.11.0" tracing-subscriber = "0.3.23" +tracing-actix-web = "0.7" thiserror = "2.0.18" uuid = "1.23.1" git2 = "0.21.0" diff --git a/app/email/Cargo.toml b/app/email/Cargo.toml index 280815a..6a4e725 100644 --- a/app/email/Cargo.toml +++ b/app/email/Cargo.toml @@ -20,9 +20,12 @@ path = "src/main.rs" anyhow = { workspace = true } config = { workspace = true } email = { workspace = true } +actix-web = { workspace = true } +tracing-actix-web = { workspace = true } +serde_json = { workspace = true } tokio = { workspace = true, features = ["rt-multi-thread", "macros", "signal"] } +track = { workspace = true } tracing = { workspace = true } -tracing-subscriber = { workspace = true, features = ["env-filter", "json"] } [lints] workspace = true \ No newline at end of file diff --git a/app/gitdata/Cargo.toml b/app/gitdata/Cargo.toml index 42696cf..406c926 100644 --- a/app/gitdata/Cargo.toml +++ b/app/gitdata/Cargo.toml @@ -31,13 +31,15 @@ api = { workspace = true } email = { workspace = true } storage = { workspace = true } git = { workspace = true } +migrate = { workspace = true } model = { workspace = true } channel = { workspace = true } socketio = { workspace = true } tokio = { workspace = true, features = ["rt-multi-thread", "macros", "signal"] } +track = { workspace = true } tracing = { workspace = true } -tracing-subscriber = { workspace = true, features = ["env-filter", "json"] } actix-web = { workspace = true, features = ["cookies", "secure-cookies"] } +tracing-actix-web = { workspace = true } actix-ws = { workspace = true } tonic = { workspace = true, features = ["transport"] } deadpool-redis = { workspace = true } diff --git a/app/gitpod/Cargo.toml b/app/gitpod/Cargo.toml index e43b586..6c0cc3c 100644 --- a/app/gitpod/Cargo.toml +++ b/app/gitpod/Cargo.toml @@ -23,8 +23,8 @@ cache = { workspace = true } db = { workspace = true } git = { workspace = true } tokio = { workspace = true, features = ["rt-multi-thread", "macros", "signal"] } +track = { workspace = true } tracing = { workspace = true } -tracing-subscriber = { workspace = true, features = ["env-filter", "json"] } deadpool-redis = { workspace = true } redis = { workspace = true, features = ["cluster-async", "aio", "tokio-comp"] } diff --git a/app/gitsync/Cargo.toml b/app/gitsync/Cargo.toml index 9228100..3cd97e9 100644 --- a/app/gitsync/Cargo.toml +++ b/app/gitsync/Cargo.toml @@ -23,9 +23,10 @@ cache = { workspace = true } db = { workspace = true } git = { workspace = true } tokio = { workspace = true, features = ["rt-multi-thread", "macros", "signal"] } +track = { workspace = true } tracing = { workspace = true } -tracing-subscriber = { workspace = true, features = ["env-filter", "json"] } actix-web = { workspace = true } +tracing-actix-web = { workspace = true } deadpool-redis = { workspace = true } redis = { workspace = true, features = ["cluster-async", "aio", "tokio-comp"] } uuid = { workspace = true } diff --git a/bun.lock b/bun.lock index 1e741b8..9c59123 100644 --- a/bun.lock +++ b/bun.lock @@ -13,6 +13,8 @@ "@fontsource-variable/geist": "^5.2.9", "@fontsource-variable/jetbrains-mono": "^5.2.8", "@fontsource-variable/space-grotesk": "^5.2.10", + "@grafana/faro-transport-otlp-http": "^2.7.0", + "@grafana/faro-web-sdk": "^2.7.0", "@lobehub/icons": "^5.10.0", "@monaco-editor/react": "^4.7.0", "@radix-ui/react-accordion": "^1.2.12", @@ -334,6 +336,12 @@ "@giscus/react": ["@giscus/react@3.1.0", "https://registry.npmmirror.com/@giscus/react/-/react-3.1.0.tgz", { "dependencies": { "giscus": "^1.6.0" }, "peerDependencies": { "react": "^16 || ^17 || ^18 || ^19", "react-dom": "^16 || ^17 || ^18 || ^19" } }, "sha512-0TCO2TvL43+oOdyVVGHDItwxD1UMKP2ZYpT6gXmhFOqfAJtZxTzJ9hkn34iAF/b6YzyJ4Um89QIt9z/ajmAEeg=="], + "@grafana/faro-core": ["@grafana/faro-core@2.7.0", "https://registry.npmmirror.com/@grafana/faro-core/-/faro-core-2.7.0.tgz", { "dependencies": { "@opentelemetry/api": "^1.9.0", "@opentelemetry/otlp-transformer": "^0.218.0" } }, "sha512-fNOfWEouoHhZ4dw+oLO+UGoMBLgiLLQU56dp9+NgO3mGNwCYsFTQuKgKQfOe5DDmAbwpRISEyLbiMkEyY7mIJQ=="], + + "@grafana/faro-transport-otlp-http": ["@grafana/faro-transport-otlp-http@2.7.0", "https://registry.npmmirror.com/@grafana/faro-transport-otlp-http/-/faro-transport-otlp-http-2.7.0.tgz", { "dependencies": { "@opentelemetry/otlp-transformer": "^0.218.0", "@opentelemetry/semantic-conventions": "^1.28.0" } }, "sha512-fFMJ+lb3EyhSNpAp+PuSvvIwzQKKF42INmrbqFPyjlEHL6ZhZvLIIRY9WHLkOMtSsgCGCkYa0ye4AHA6uOUJVw=="], + + "@grafana/faro-web-sdk": ["@grafana/faro-web-sdk@2.7.0", "https://registry.npmmirror.com/@grafana/faro-web-sdk/-/faro-web-sdk-2.7.0.tgz", { "dependencies": { "@grafana/faro-core": "^2.7.0", "ua-parser-js": "1.0.41", "web-vitals": "^5.1.0" } }, "sha512-NIbFK2g634/KOcq6ej1LseZrbbRejBiIrO8beQpYX6CkyXVGrcdoWRfJdqkQ3Ys60h4aTH+xoAh2Oh0HebhOZg=="], + "@hono/node-server": ["@hono/node-server@1.19.14", "https://registry.npmmirror.com/@hono/node-server/-/node-server-1.19.14.tgz", { "peerDependencies": { "hono": "^4" } }, "sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw=="], "@humanfs/core": ["@humanfs/core@0.19.2", "https://registry.npmmirror.com/@humanfs/core/-/core-0.19.2.tgz", { "dependencies": { "@humanfs/types": "^0.15.0" } }, "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA=="], @@ -418,6 +426,22 @@ "@opentelemetry/api": ["@opentelemetry/api@1.9.1", "https://registry.npmmirror.com/@opentelemetry/api/-/api-1.9.1.tgz", {}, "sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q=="], + "@opentelemetry/api-logs": ["@opentelemetry/api-logs@0.218.0", "https://registry.npmmirror.com/@opentelemetry/api-logs/-/api-logs-0.218.0.tgz", { "dependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-fmEWp5kXlGEc3i/lR698Hz41DfGyN4Tbe4g7L1AxSc7fF8Xeh/FQ9Quqpa9dVA413Q1Ad43QOLzU4JoXgbFPWw=="], + + "@opentelemetry/core": ["@opentelemetry/core@2.7.1", "https://registry.npmmirror.com/@opentelemetry/core/-/core-2.7.1.tgz", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-QAqIj32AtK6+pEVNG7EOVxHdE06RP+FM5qpiEJ4RtDcFIqKUZHYhl7/7UY5efhwmwNAg7j8QbJVBLxMerc0+gw=="], + + "@opentelemetry/otlp-transformer": ["@opentelemetry/otlp-transformer@0.218.0", "https://registry.npmmirror.com/@opentelemetry/otlp-transformer/-/otlp-transformer-0.218.0.tgz", { "dependencies": { "@opentelemetry/api-logs": "0.218.0", "@opentelemetry/core": "2.7.1", "@opentelemetry/resources": "2.7.1", "@opentelemetry/sdk-logs": "0.218.0", "@opentelemetry/sdk-metrics": "2.7.1", "@opentelemetry/sdk-trace-base": "2.7.1" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-CFaKH87WAzjuJ4awowTTLzUvMfaRfiOFG5+qm5S5ncyalRtN4ecQ+YmuANJSCrVPuvZFEkUgKhBPBndxi3rHsQ=="], + + "@opentelemetry/resources": ["@opentelemetry/resources@2.7.1", "https://registry.npmmirror.com/@opentelemetry/resources/-/resources-2.7.1.tgz", { "dependencies": { "@opentelemetry/core": "2.7.1", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ=="], + + "@opentelemetry/sdk-logs": ["@opentelemetry/sdk-logs@0.218.0", "https://registry.npmmirror.com/@opentelemetry/sdk-logs/-/sdk-logs-0.218.0.tgz", { "dependencies": { "@opentelemetry/api-logs": "0.218.0", "@opentelemetry/core": "2.7.1", "@opentelemetry/resources": "2.7.1", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.4.0 <1.10.0" } }, "sha512-QvnNdugatFTVCJXH0Mcu7GOOJSylA9j127kIezOE4YwTI4YbowRons2K4WZTv5FMS8T4q9P0NdaRHdkSmeAIag=="], + + "@opentelemetry/sdk-metrics": ["@opentelemetry/sdk-metrics@2.7.1", "https://registry.npmmirror.com/@opentelemetry/sdk-metrics/-/sdk-metrics-2.7.1.tgz", { "dependencies": { "@opentelemetry/core": "2.7.1", "@opentelemetry/resources": "2.7.1" }, "peerDependencies": { "@opentelemetry/api": ">=1.9.0 <1.10.0" } }, "sha512-MpDJdkiFDs3Pm1RHO3KByuZbuBdJEXEAkiC0+yJdsZGVCdf1RpHR6n+LHDcS7ffmfrt5kVCzJSCfm4z2C7v0uQ=="], + + "@opentelemetry/sdk-trace-base": ["@opentelemetry/sdk-trace-base@2.7.1", "https://registry.npmmirror.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.7.1.tgz", { "dependencies": { "@opentelemetry/core": "2.7.1", "@opentelemetry/resources": "2.7.1", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-NAYIlsF8MPUsKqJMiDQJTMPOmlbawC1Iz/omMLygZ1C9am8fTKYjTaI+OZM+WTY3t3Glo0wnOg/6/pac6RGPPw=="], + + "@opentelemetry/semantic-conventions": ["@opentelemetry/semantic-conventions@1.41.1", "https://registry.npmmirror.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.41.1.tgz", {}, "sha512-/UhIkaZgPutTFmQ7RnIJGgDXZmtEJ7Dvi86xNTFWcnRxVRNk/aotsqDJYeEvDP+FSMB2SdW+pQzNMcWP0rwuNA=="], + "@orval/angular": ["@orval/angular@8.12.3", "https://registry.npmmirror.com/@orval/angular/-/angular-8.12.3.tgz", { "dependencies": { "@orval/core": "8.12.3" } }, "sha512-NKICGEFYivnKKJYKcI1iCuG37nEn08pia91bfucSf4Pe36e2MJsfIWdM27s/ly+M0mgLz6L28SCXWaIwnvShbQ=="], "@orval/axios": ["@orval/axios@8.12.3", "https://registry.npmmirror.com/@orval/axios/-/axios-8.12.3.tgz", { "dependencies": { "@orval/core": "8.12.3" } }, "sha512-zl3PNqfJCucfQXdZzkRYaj0F6ktkZOoZbCTyzo5yWAmsZqKYrx2MdIe9uJCR++0xhhSCRuEenT4ZubeFA/bOvQ=="], @@ -2282,6 +2306,8 @@ "typescript-eslint": ["typescript-eslint@8.59.4", "https://registry.npmmirror.com/typescript-eslint/-/typescript-eslint-8.59.4.tgz", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.59.4", "@typescript-eslint/parser": "8.59.4", "@typescript-eslint/typescript-estree": "8.59.4", "@typescript-eslint/utils": "8.59.4" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-Rw6+44QNFaXtgHSjPy+Kw8hrJniMYzR85E9yLmOLcfZ91/rz+JXQbDTCmc6ccxMPY6K6PgAq26f0JCBfR7LIPQ=="], + "ua-parser-js": ["ua-parser-js@1.0.41", "https://registry.npmmirror.com/ua-parser-js/-/ua-parser-js-1.0.41.tgz", { "bin": { "ua-parser-js": "script/cli.js" } }, "sha512-LbBDqdIC5s8iROCUjMbW1f5dJQTEFB1+KO9ogbvlb3nm9n4YHa5p4KTvFPWvh2Hs8gZMBuiB1/8+pdfe/tDPug=="], + "uc.micro": ["uc.micro@1.0.6", "https://registry.npmmirror.com/uc.micro/-/uc.micro-1.0.6.tgz", {}, "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="], "undici-types": ["undici-types@7.16.0", "https://registry.npmmirror.com/undici-types/-/undici-types-7.16.0.tgz", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="], @@ -2356,6 +2382,8 @@ "web-streams-polyfill": ["web-streams-polyfill@3.3.3", "https://registry.npmmirror.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", {}, "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="], + "web-vitals": ["web-vitals@5.3.0", "https://registry.npmmirror.com/web-vitals/-/web-vitals-5.3.0.tgz", {}, "sha512-q6LWsLatGYZp5VGBIOvbTj6JBV2nOmC8KvWztXBmwJcfFAzhwKwbOxhUH306XY3CcaZDUlSmSuNPBsCn0bFu+g=="], + "which": ["which@2.0.2", "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], "word-wrap": ["word-wrap@1.2.5", "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.5.tgz", {}, "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA=="], diff --git a/lib/ai/Cargo.toml b/lib/ai/Cargo.toml index c58fbfb..443a77e 100644 --- a/lib/ai/Cargo.toml +++ b/lib/ai/Cargo.toml @@ -24,6 +24,7 @@ config = { workspace = true } cache = { workspace = true } db = { workspace = true } thiserror = { workspace = true } +track = { workspace = true } tracing = { workspace = true } serde_json = { workspace = true } serde = { workspace = true, features = ["derive"] } diff --git a/lib/api/Cargo.toml b/lib/api/Cargo.toml index cbcac43..25cec65 100644 --- a/lib/api/Cargo.toml +++ b/lib/api/Cargo.toml @@ -40,6 +40,8 @@ comrak = { workspace = true } redis = { workspace = true, features = ["cluster-async", "aio", "tokio-comp"] } storage = { workspace = true } reqwest = { workspace = true } +track = { workspace = true } +tracing = { workspace = true } urlencoding = { workspace = true } [lints] diff --git a/lib/cache/Cargo.toml b/lib/cache/Cargo.toml index c94c283..9d81079 100644 --- a/lib/cache/Cargo.toml +++ b/lib/cache/Cargo.toml @@ -22,5 +22,7 @@ moka = { workspace = true, features = ["future"] } serde_json = { workspace = true } serde = { workspace = true } config = { workspace = true } +track = { workspace = true } +tracing = { workspace = true } [lints] workspace = true diff --git a/lib/channel/Cargo.toml b/lib/channel/Cargo.toml index b0a156c..18efc4d 100644 --- a/lib/channel/Cargo.toml +++ b/lib/channel/Cargo.toml @@ -34,6 +34,7 @@ thiserror = { workspace = true } tokio = { workspace = true, features = ["sync", "time"] } tokio-util = { workspace = true } tracing = { workspace = true } +track = { workspace = true } uuid = { workspace = true, features = ["serde", "v7"] } lazy_static = "1.5.0" [lints] diff --git a/lib/db/Cargo.toml b/lib/db/Cargo.toml index 7529fbd..416642e 100644 --- a/lib/db/Cargo.toml +++ b/lib/db/Cargo.toml @@ -21,5 +21,7 @@ sea-orm = { workspace = true } anyhow = { workspace = true } sqlx = { workspace = true, features = ["postgres","runtime-tokio"]} sqlparser = { workspace = true, features = [] } +track = { workspace = true } +tracing = { workspace = true } [lints] workspace = true diff --git a/lib/email/Cargo.toml b/lib/email/Cargo.toml index 6a68416..0d6e049 100644 --- a/lib/email/Cargo.toml +++ b/lib/email/Cargo.toml @@ -26,6 +26,7 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } tokio = { workspace = true, features = ["rt", "time"] } tracing = { workspace = true } +track = { workspace = true } [lints] workspace = true diff --git a/lib/git/Cargo.toml b/lib/git/Cargo.toml index 4ce22b3..36e29e1 100644 --- a/lib/git/Cargo.toml +++ b/lib/git/Cargo.toml @@ -36,9 +36,11 @@ serde_json = { workspace = true } tonic = { workspace = true } prost = { workspace = true } dashmap = { workspace = true } +track = { workspace = true } tracing = { workspace = true } tokio-stream = { workspace = true } actix-web = { workspace = true, features = [] } +tracing-actix-web = { workspace = true } russh = { workspace = true, features = ["async-trait","rsa","legacy-ed25519-pkcs8-parser","serde"] } hmac = { workspace = true } hex = { workspace = true } diff --git a/lib/migrate/Cargo.toml b/lib/migrate/Cargo.toml index 013a088..b964289 100644 --- a/lib/migrate/Cargo.toml +++ b/lib/migrate/Cargo.toml @@ -12,13 +12,17 @@ keywords.workspace = true categories.workspace = true documentation.workspace = true +[lib] +path = "lib.rs" +name = "migrate" + [dependencies] tokio = { workspace = true, features = ["full"] } sqlx = { workspace = true, features = ["postgres", "runtime-tokio", "chrono", "uuid"] } tracing = { workspace = true } tracing-subscriber = { workspace = true, features = ["env-filter"] } anyhow = { workspace = true } -clap = { version = "4", features = ["derive"] } +clap = { version = "4", features = ["derive", "env"] } serde = { workspace = true, features = ["derive"] } [lints] diff --git a/lib/queue/Cargo.toml b/lib/queue/Cargo.toml index 6c78440..6dc18cd 100644 --- a/lib/queue/Cargo.toml +++ b/lib/queue/Cargo.toml @@ -20,6 +20,7 @@ async-nats = { workspace = true } tokio = { workspace = true, features = ["full"] } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } +track = { workspace = true } tracing = { workspace = true } anyhow = { workspace = true } async-trait = { workspace = true } diff --git a/lib/service/Cargo.toml b/lib/service/Cargo.toml index 892efcb..506273e 100644 --- a/lib/service/Cargo.toml +++ b/lib/service/Cargo.toml @@ -37,7 +37,9 @@ base64 = "0.22.1" serde_json = "1.0.150" rand = "0.10.1" hex = "0.4.3" -tracing = "0.1.44" +track = { workspace = true } +prometheus = "0.13" +tracing = { workspace = true } sqlx = { workspace = true } captcha-rs = "0.5.0" argon2 = "0.6.0-rc.8" diff --git a/lib/storage/Cargo.toml b/lib/storage/Cargo.toml index 0c3b4b4..2012c75 100644 --- a/lib/storage/Cargo.toml +++ b/lib/storage/Cargo.toml @@ -25,6 +25,8 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["fs", "io-util", "macros", "rt-multi-thread"] } +track = { workspace = true } +tracing = { workspace = true } [lints] workspace = true diff --git a/package.json b/package.json index ab2ef5f..817bd18 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,8 @@ "@fontsource-variable/geist": "^5.2.9", "@fontsource-variable/jetbrains-mono": "^5.2.8", "@fontsource-variable/space-grotesk": "^5.2.10", + "@grafana/faro-transport-otlp-http": "^2.7.0", + "@grafana/faro-web-sdk": "^2.7.0", "@lobehub/icons": "^5.10.0", "@monaco-editor/react": "^4.7.0", "@radix-ui/react-accordion": "^1.2.12", diff --git a/vite.config.ts b/vite.config.ts index f12a092..7ce6d8a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,7 +3,11 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' -export default defineConfig({ +export default defineConfig(({ mode }) => ({ + define: { + __APP_VERSION__: JSON.stringify(process.env.npm_package_version || '0.0.0'), + __APP_ENV__: JSON.stringify(mode), + }, plugins: [react(), tailwindcss()], resolve: { alias: { @@ -22,4 +26,4 @@ export default defineConfig({ }, } }, -}) +}))