SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
feat: move out of using monaco cdn to using monaco from node modules (#12515)
Aditya Singhabf60c0af369
diff --git a/frontend/package.json b/frontend/package.jsonindex 989cd90df9..5f802d5ed2 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -88,6 +88,7 @@"jest": "30.2.0","js-base64": "^3.7.2","lodash-es": "^4.17.21",+ "monaco-editor": "0.55.1","motion": "12.4.13","nuqs": "2.8.8","overlayscrollbars": "^2.16.0",@@ -237,4 +238,4 @@"tmp@<0.2.6": ">=0.2.6 <0.3.0","yaml@>=1.0.0 <1.10.3": ">=1.10.3 <2"}-}+}\ No newline at end of filediff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yamlindex 0fe84fa387..1f27049887 100644--- a/frontend/pnpm-lock.yaml+++ b/frontend/pnpm-lock.yaml@@ -180,6 +180,9 @@ importers:lodash-es:specifier: ^4.17.21version: 4.18.1+ monaco-editor:+ specifier: 0.55.1+ version: 0.55.1motion:specifier: 12.4.13version: 12.4.13(@emotion/[email protected])([email protected]([email protected]))([email protected])@@ -1755,105 +1758,89 @@ packages:resolution: {integrity: sha512-C0SqjoFKnszqa44EQ7xoaT48nnO0lOyXEULfXMWi8krrjOPGYkeK30Okzla6ATbBYsyZ0ySinK0FVkpv3DwzfQ==}cpu: [arm64]os: [linux]- libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-A8UpHoUDW4DwnXoV6+q3C1s7QLRAHtPDEjWuNZjwHMyoCNZnm0GeNN8ls9f/bsEYTRQRW96C/n34XJQHJ2fT7A==}cpu: [arm]os: [linux]- libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-WOpkVxAjFd369iaIzEgNRreFD+gWdUMIGD5zplhNKNeqS6mm5dac3q2AFyCBmzYoAdouzZvRBgxy4z8QHZb4/A==}cpu: [ppc64]os: [linux]- libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-DRWw0mOHusrCCuw2rqP87oLg6PGlkomVDFqw2hIwsSfwWpu4k3XLcBPaKKl6ct/GtL/cwNkgwjV/tc0Mqht3VA==}cpu: [riscv64]os: [linux]- libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-9APy+nFWhHS+kzLgWZfLcyrUd7YqnAQVa4BPOo4xkoHpdoktOAPG4cEr9+Jpl0TtqfVmcMJimNL5qNTyyOHZNA==}cpu: [s390x]os: [linux]- libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-y9RNUYDe2A1UAdhLyfeOodGRszQdaEoe4nfOpp/sNVPl2CWIcUyFaDoCh4vPLPxu19803j2naLqZup2WxDXCLA==}cpu: [x64]os: [linux]- libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-cC1wkC0Mlucd0KSiGrLkJnB/ZqPvZCntc/Lk7ZnYO5ZSbF2euNek4Xvxafojq+wN1q/W0eprdpUIjUr/EV2PBg==}cpu: [arm64]os: [linux]- libc: [musl]'@img/[email protected]':resolution: {integrity: sha512-LiYMhUZicB1QG//+RvmYZpXJO8fYRENfp+MZUCnG9aw+AKvGAy9gPaCnuwsPcBFs8EV66M0NNxj9VHcNklE8zw==}cpu: [x64]os: [linux]- libc: [musl]'@img/[email protected]':resolution: {integrity: sha512-4+4XHLNT5wDT0roYlHTEmH9lDKt0acf9Tv+3hM3iceOirkxrR404/3WjAYZ9F9CkHrxeRcGLJXbi4vluMZ9O+A==}engines: {node: '>=20.9.0'}cpu: [arm64]os: [linux]- libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-VVlpEWwizEFIOom0zdoeKuO5nuTswzVE5uHcBNvHzmeHUpNFajY3HFfbQ+zIH4E2kVaZ/yVxmsShW56TtEy4uA==}engines: {node: '>=20.9.0'}cpu: [arm]os: [linux]- libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-N3hzbEpUTJC8pWpPVJvgzGxM+so/MAXc8O2s/53B0LL9ZGpfXpME7Wizkc5d/8fRBlBtkDjzoZGDCqqNDHqLEw==}engines: {node: '>=20.9.0'}cpu: [ppc64]os: [linux]- libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-l6vmKVPnbS0RhVMbyxP5meAARsbhCnBN4fy31qz0+3a6Rv4jEqfzDrT89y6ZPkCi0AJGnwp2En528yXo401Hpw==}engines: {node: '>=20.9.0'}cpu: [riscv64]os: [linux]- libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-MYlMiPFiv/EKPAHnp3yNZ9AAWFsxga9c5Bkc6wkar6bqzHLlkGVJHRm0u1ei+VXnZxp3Mz9MG9ZIsI8vSOf3sQ==}engines: {node: '>=20.9.0'}cpu: [s390x]os: [linux]- libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-TYaItB5oj1ioXjhyn2xrR208vf+YuIIcHptQWRRaBmFhvIvL9D72DXN8w75xup0KXA8UdEAhQ9Qb2S49FD/9Cw==}engines: {node: '>=20.9.0'}cpu: [x64]os: [linux]- libc: [glibc]'@img/[email protected]':resolution: {integrity: sha512-DSTb6ijQzqe6DdAaOBVqJ/SYf1vO8EW5bK6X6LRXufEBebf2722VCdvBUtZ3rtV0x2ApfPNDy/p7LrrjaWjiyQ==}engines: {node: '>=20.9.0'}cpu: [arm64]os: [linux]- libc: [musl]'@img/[email protected]':resolution: {integrity: sha512-K7ykQ+26Rt6+4BTU80AuGgTPIYX86UxiAKT4rcXX/WNTo7k1ZxpKz+TguHnwVpCqQK3B5PK0vZ0ZBe6nz/ib1w==}engines: {node: '>=20.9.0'}cpu: [x64]os: [linux]- libc: [musl]'@img/[email protected]':resolution: {integrity: sha512-9woLIFORERCr+6cWu87dQ22J34EExkhc73U1kZW0c+RclQqWetoodByp4dWZ/hN8/KVmTRAx2HOnUwib8AwZdA==}@@ -2234,56 +2221,48 @@ packages:engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [linux]- libc: [glibc]'@oxfmt/[email protected]':resolution: {integrity: sha512-QrwJlBFFKnxOd95TAaszpMbZBLzMoYMpGaQTZF8oibacnF5rv8l12IhILhQRPmksWiBqg0YSe2Mnl7ayeJAHSA==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [linux]- libc: [musl]'@oxfmt/[email protected]':resolution: {integrity: sha512-WILatiol/TUHTlhod7R09+7Az/XlhKwmY1MHfLZNmewltPWNN/EwxP2rQSHahibZ/cB8gmckEBjBOByD+5bYsQ==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [ppc64]os: [linux]- libc: [glibc]'@oxfmt/[email protected]':resolution: {integrity: sha512-f05YMG4BH4G8S4ME6UM6fi1MnJ9094mrnvO5Pa4SJlMfWlUM+1/ZWMEF4NnjM7shZAvbHsHRuVYpUo0PHC4P9Q==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [riscv64]os: [linux]- libc: [glibc]'@oxfmt/[email protected]':resolution: {integrity: sha512-UfL+2hj1ClNqcCRT9s8vBU4axDpjxgVxX96G+9DYAYjoc5b0u15CJtn2jgsi9iM+EbGNc5CW1HVRgwVu76UsSA==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [riscv64]os: [linux]- libc: [musl]'@oxfmt/[email protected]':resolution: {integrity: sha512-3/XZe931Hka+J6NjnaqJzYpsWWxDTuRdUdwSQHnOuJEgbC+SehIMFJS8hsEjV7LBhVSL2OCnRLvbVW8O97XIyw==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [s390x]os: [linux]- libc: [glibc]'@oxfmt/[email protected]':resolution: {integrity: sha512-Ik93RlObtu43GbxApafayFjwYE06L6Xr08cSwpBPYbDrLp2ReZx0Jm1DqwRyYRnukUJy+rK2WaEvUQOxdytU9Q==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [linux]- libc: [glibc]'@oxfmt/[email protected]':resolution: {integrity: sha512-yZcakmPlD86CNymknd7KfW+FH+qfbqJH+i0h69CYfV1+KMoVeM9UED+8+TDVoU4haxI0NxY7RPCvRLy3Sqd2Qg==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [linux]- libc: [musl]'@oxfmt/[email protected]':resolution: {integrity: sha512-GiVBZNnEZnKu00f1jTg49nomv187d0GQX+O+ocykoLeiaALuEO+swoTehHn9TehTfi7V8H0i0e/yvUjCqnwk1w==}@@ -2386,56 +2365,48 @@ packages:engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [linux]- libc: [glibc]'@oxlint/[email protected]':resolution: {integrity: sha512-xEPpNppTfN1l/nM7gYSf9iocscu/as+p/7vxkLeLEKnYU+09Dm+5V6IhDYDh+Uz6FajEupWwCLt5SOG0y1PCKg==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [linux]- libc: [musl]'@oxlint/[email protected]':resolution: {integrity: sha512-Ug0+eU7HJBlek+SjklYH62IlOMirEJsdxpihH0kSqX0XdrDD4NdHpQc10fK1JC35yn6KrrcN+uYzlHD38XAf8Q==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [ppc64]os: [linux]- libc: [glibc]'@oxlint/[email protected]':resolution: {integrity: sha512-iEyI3GIg0l/s3G4qy2TlaaWKdzj4PJJStwtlocpDTC00PY9hZueotf6OKUj9+yfQh0lrpBW/pLMgTztbAHKJEg==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [riscv64]os: [linux]- libc: [glibc]'@oxlint/[email protected]':resolution: {integrity: sha512-NjHjpiI4WIKSMwuoJSZi5VToPeoYOS1FR52HLIDG6lidMdqquusgtODb4iLk0+lb1q3Z0nv2/aPRcC/olmpQGg==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [riscv64]os: [linux]- libc: [musl]'@oxlint/[email protected]':resolution: {integrity: sha512-Ai/prDewoItkDXbp38gwGZi41DycZbUTZJ3UidwoHgQC0/DaqC2TGdtBTQLJ6hSD+SAxASzh8+/eSBPmxfOacA==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [s390x]os: [linux]- libc: [glibc]'@oxlint/[email protected]':resolution: {integrity: sha512-Gt3KHgp46mRKz4sJeaASmKvD8ayXookRw07RMf+NowhEztGGDZ7VrXpoW96XuKJLjFukWizOFVNjmYb/u7caNQ==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [linux]- libc: [glibc]'@oxlint/[email protected]':resolution: {integrity: sha512-7tQhJ2+p/oHv1zcfnjYI7YVzC/7iBaVOfIvFYtxdJ5F45mWgEdrCyXZXZGfiLey5t/5JhOhsaMnnv1kAzckd7g==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [linux]- libc: [musl]'@oxlint/[email protected]':resolution: {integrity: sha512-vmWz6TKp/3hfA4lksR0zHBv/6xuX1jhym6eqOjdH2DXsDDHZWcp2f0KG0VCAnlVbIrjk29G4wAWMXb/Hn1YobA==}@@ -2490,42 +2461,36 @@ packages:engines: {node: '>= 10.0.0'}cpu: [arm]os: [linux]- libc: [glibc]'@parcel/[email protected]':resolution: {integrity: sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==}engines: {node: '>= 10.0.0'}cpu: [arm]os: [linux]- libc: [musl]'@parcel/[email protected]':resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==}engines: {node: '>= 10.0.0'}cpu: [arm64]os: [linux]- libc: [glibc]'@parcel/[email protected]':resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==}engines: {node: '>= 10.0.0'}cpu: [arm64]os: [linux]- libc: [musl]'@parcel/[email protected]':resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==}engines: {node: '>= 10.0.0'}cpu: [x64]os: [linux]- libc: [glibc]'@parcel/[email protected]':resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==}engines: {node: '>= 10.0.0'}cpu: [x64]os: [linux]- libc: [musl]'@parcel/[email protected]':resolution: {integrity: sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==}@@ -3142,28 +3107,24 @@ packages:engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [linux]- libc: [glibc]'@rolldown/[email protected]':resolution: {integrity: sha512-bGe5EBB8FVjHBR1mOLOPEFg1Lp3//7geqWkU5NIhxe+yH0W8FVrQ6WRYOap4SUTKdklD/dC4qPLREkMMQ855FA==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [arm64]os: [linux]- libc: [musl]'@rolldown/[email protected]':resolution: {integrity: sha512-qL+63WKVQs1CMvFedlPt0U9PiEKJOAL/bsHMKUDS6Vp2Q+YAv/QLPu8rcvkfIMvQ0FPU2WL0aX4eWwF6e/GAnA==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [linux]- libc: [glibc]'@rolldown/[email protected]':resolution: {integrity: sha512-VGl9JIGjoJh3H8Mb+7xnVqODajBmrdOOb9lxWXdcmxyI+zjB2sux69br0hZJDTyLJfvBoYm439zPACYbCjGRmw==}engines: {node: ^20.19.0 || >=22.12.0}cpu: [x64]os: [linux]- libc: [musl]'@rolldown/[email protected]':resolution: {integrity: sha512-B4iIserJXuSnNzA5xBLFUIjTfhNy7d9sq4FUMQY3GhQWGVhS2RWWzzDnkSU6MUt7/aHUrep0CdQfXUJI9D3W7A==}@@ -3824,49 +3785,41 @@ packages:resolution: {integrity: sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==}cpu: [arm64]os: [linux]- libc: [glibc]'@unrs/[email protected]':resolution: {integrity: sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==}cpu: [arm64]os: [linux]- libc: [musl]'@unrs/[email protected]':resolution: {integrity: sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==}cpu: [ppc64]os: [linux]- libc: [glibc]'@unrs/[email protected]':resolution: {integrity: sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==}cpu: [riscv64]os: [linux]- libc: [glibc]'@unrs/[email protected]':resolution: {integrity: sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==}cpu: [riscv64]os: [linux]- libc: [musl]'@unrs/[email protected]':resolution: {integrity: sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==}cpu: [s390x]os: [linux]- libc: [glibc]'@unrs/[email protected]':resolution: {integrity: sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==}cpu: [x64]os: [linux]- libc: [glibc]'@unrs/[email protected]':resolution: {integrity: sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==}cpu: [x64]os: [linux]- libc: [musl]'@unrs/[email protected]':resolution: {integrity: sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==}@@ -6275,28 +6228,24 @@ packages:engines: {node: '>= 12.0.0'}cpu: [arm64]os: [linux]- libc: [glibc]resolution: {integrity: sha512-mVZ7Pg2zIbe3XlNbZJdjs86YViQFoJSpc41CbVmKBPiGmC4YrfeOyz65ms2qpAobVd7WQsbW4PdsSJEMymyIMg==}engines: {node: '>= 12.0.0'}cpu: [arm64]os: [linux]- libc: [musl]resolution: {integrity: sha512-xGlFWRMl+0KvUhgySdIaReQdB4FNudfUTARn7q0hh/V67PVGCs3ADFjw+6++kG1RNd0zdGRlEKa+T13/tQjPMA==}engines: {node: '>= 12.0.0'}cpu: [x64]os: [linux]- libc: [glibc]resolution: {integrity: sha512-eowF8PrKHw9LpoZii5tdZwnBcYDxRw2rRCyvAXLi34iyeYfqCQNA9rmUM0ce62NlPhCvof1+9ivRaTY6pSKDaA==}engines: {node: '>= 12.0.0'}cpu: [x64]os: [linux]- libc: [musl]resolution: {integrity: sha512-aJReEbSEQzx1uBlQizAOBSjcmr9dCdL3XuC/6HLXAxmtErsj2ICo5yYggg1qOODQMtnjNQv2UHb9NpOuFtYe4w==}diff --git a/frontend/src/index.tsx b/frontend/src/index.tsxindex 1ed54da112..3d6ec0c4d7 100644--- a/frontend/src/index.tsx+++ b/frontend/src/index.tsx@@ -15,6 +15,8 @@ import store from 'store';import APIError from 'types/api/error';import { installTranslationResilience } from 'translation-resilience';+import 'lib/monaco/setup';+import './ReactI18';import 'styles.scss';diff --git a/frontend/src/lib/monaco/setup.ts b/frontend/src/lib/monaco/setup.tsnew file mode 100644index 0000000000..abae1f9594--- /dev/null+++ b/frontend/src/lib/monaco/setup.ts@@ -0,0 +1,21 @@+import { loader } from '@monaco-editor/react';+import * as monaco from 'monaco-editor';+import EditorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';+import JsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker';++// Serve Monaco's workers from our own origin instead of letting @monaco-editor/loader+// fetch them from cdn.jsdelivr.net at runtime. The CDN default breaks the editor in+// air-gapped/on-prem installs, CDN-blocking corporate networks, and regions where+// jsdelivr is unreachable. Ref: engineering-pod#5871, SIGNOZ-UI-5G0.+self.MonacoEnvironment = {+ getWorker(_workerId: string, label: string): Worker {+ if (label === 'json') {+ return new JsonWorker(); // JSON language service+ }+ // SigNoz editors use JSON + a hand-registered ClickHouse tokenizer (no worker),+ // so the base editor worker covers everything else.+ return new EditorWorker(); // base worker — sql, yaml, plaintext etc.+ },+};++loader.config({ monaco });