Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. πŸ”₯

bugfix: using onlyIncludeTags and removeTags together

skeptrune26825fc8fb24
diff --git a/apps/api/src/scraper/WebScraper/utils/__tests__/removeUnwantedElements.test.ts b/apps/api/src/scraper/WebScraper/utils/__tests__/removeUnwantedElements.test.ts
index 18438df22..b3d4a244c 100644
--- a/apps/api/src/scraper/WebScraper/utils/__tests__/removeUnwantedElements.test.ts
+++ b/apps/api/src/scraper/WebScraper/utils/__tests__/removeUnwantedElements.test.ts
@@ -144,6 +144,7 @@ describe('removeUnwantedElements', () => {
expect(result).not.toContain('<aside>');
expect(result).not.toContain('<footer>');
});
+
it('should include specified tags with class', () => {
const html = `<div><main class="main-content">Main Content</main><aside class="remove">Remove</aside><footer class="footer-content">Footer Content</footer></div>`;
const options: PageOptions = { onlyIncludeTags: ['.main-content', '.footer-content'] };
@@ -171,5 +172,21 @@ describe('removeUnwantedElements', () => {
expect(result).not.toContain('<aside id="remove">');
});
+ it("should handle cases when both onlyIncludeTags and removeTags are spec'ed", () => {
+ const html = `<html lang="en-us" class="__className_36bd41 scroll-smooth">\n <head>\n <meta charSet="utf-8"/>\n <meta name="viewport" content="width=device-width, initial-scale=1"/>\n <link rel="preload" href="/_next/static/media/a34f9d1faa5f3315-s.p.woff2" as="font" crossorigin="" type="font/woff2"/>\n <link rel="preload" as="image" href="/svgs/icons/hipaa.svg"/>\n <link rel="preload" as="image" href="/svgs/icons/SOC-2.svg"/>\n <link rel="stylesheet" href="/_next/static/css/dc440bb5df3a2a20.css" data-precedence="next"/>\n <link rel="stylesheet" href="/_next/static/css/96453cad2522e5b6.css" data-precedence="next"/>\n <link rel="stylesheet" href="/_next/static/css/7e9926f1811c58a4.css" data-precedence="next"/>\n <link rel="stylesheet" href="/_next/static/css/0e73fdc06d8f3d28.css" data-precedence="next"/>\n <link rel="stylesheet" href="/_next/static/css/5530fdfe2817e998.css" data-precedence="next"/>\n <link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-fd8ac6b7ecd741f2.js"/>\n \x3Cscript src="/_next/static/chunks/fd9d1056-ef540aea688b4954.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/7023-05706eafa5cc37bc.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/main-app-b8d8f654a4c3de8b.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/231-548ba71c7495df73.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/5195-b5571fdee73263ae.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/app/docs/layout-6b3055e085554812.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/8032-14ad89cc247326be.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/6648-ad581d791656821c.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/9955-d2e26e97f84b5584.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/3284-f8e8685fda3e660b.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/1510-58126d0ea9869b6a.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/8279-af16984c3178bf87.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/8546-37038ae8418f7528.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/app/layout-44a592a2d715aed2.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/9448-374795341a6afe73.js" async="">\x3C/script>\n \x3Cscript src="/_next/static/chunks/app/docs/%5B...slug%5D/page-5ec83f06ca67a50a.js" async="">\x3C/script>\n <link rel="preload" href="https://www.googletagmanager.com/gtm.js?id=GTM-N9B6D4H" as="script"/>\n <title>Docker Swarm | SigNoz</title>\n <meta name="description" content="Learn how to operate SigNoz on Docker Swarm"/>\n <meta name="robots" content="index, follow"/>\n <meta name="googlebot" content="index, follow, max-video-preview:-1, max-image-preview:large, max-snippet:-1"/>\n <link rel="canonical" href="https://signoz.io/docs/operate/docker-swarm/"/>\n <link rel="alternate" type="application/rss+xml" href="https://signoz.io/feed.xml/"/>\n <meta property="og:title" content="Docker Swarm"/>\n <meta property="og:description" content="Learn how to operate SigNoz on Docker Swarm"/>\n <meta property="og:url" content="https://signoz.io/docs/operate/docker-swarm/"/>\n <meta property="og:site_name" content="SigNoz"/>\n <meta property="og:locale" content="en_US"/>\n <meta property="og:type" content="article"/>\n <meta name="twitter:card" content="summary_large_image"/>\n <meta name="twitter:title" content="Docker Swarm"/>\n <meta name="twitter:description" content="Learn how to operate SigNoz on Docker Swarm"/>\n <meta name="next-size-adjust"/>\n <link rel="apple-touch-icon" sizes="76x76" href="/static/favicons/apple-touch-icon.png"/>\n <link rel="icon" type="image/png" sizes="32x32" href="/static/favicons/favicon-32x32.png"/>\n <link rel="icon" type="image/png" sizes="16x16" href="/static/favicons/favicon-16x16.png"/>\n <link rel="manifest" href="/static/favicons/site.webmanifest"/>\n <link rel="mask-icon" href="/static/favicons/safari-pinned-tab.svg" color="#5bbad5"/>\n <meta name="msapplication-TileColor" content="#000000"/>\n <meta name="theme-color" media="(prefers-color-scheme: light)" content="#fff"/>\n <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#000"/>\n <link rel="alternate" type="application/rss+xml" href="/feed.xml"/>\n \x3Cscript src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule="">\x3C/script>\n </head>\n <body class="pl-[calc(100vw-100%)] text-white antialiased">\n <noscript>\n <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-N9B6D4H" height="0" width="0" style="display:none;visibility:hidden"></iframe>\n </noscript>\n \x3Cscript>\n !function() {\n try {\n var d = document.documentElement\n , c = d.classList;\n c.remove('light', 'dark');\n var e = localStorage.getItem('theme');\n if ('system' === e || (!e && false)) {\n var t = '(prefers-color-scheme: dark)'\n , m = window.matchMedia(t);\n if (m.media !== t || m.matches) {\n d.style.colorScheme = 'dark';\n c.add('dark')\n } else {\n d.style.colorScheme = 'light';\n c.add('light')\n }\n } else if (e) {\n c.add(e || '')\n } else {\n c.add('dark')\n }\n if (e === 'light' || e === 'dark' || !e)\n d.style.colorScheme = e || 'dark'\n } catch (e) {}\n }()\n \x3C/script>\n <section class="relative mx-auto">\n <div class="relative flex h-screen flex-col justify-between ">\n <div class="fixed left-0 right-0 z-30">\n <header class="header-bg mx-auto box-border flex h-[56px] w-full items-center border-b border-signoz_slate-500 px-4 text-signoz_vanilla-100 backdrop-blur-[20px] dark:text-signoz_vanilla-100 md:px-8 lg:px-8">\n <nav class="container flex w-full justify-between text-signoz_vanilla-100 dark:text-signoz_vanilla-100" aria-label="Global">\n <div class="flex justify-start gap-x-6">\n <a class="-m-1.5 flex items-center gap-2 p-1.5" href="/">\n <img alt="" loading="lazy" width="160" height="60" decoding="async" data-nimg="1" class="h-5 w-auto" style="color:transparent" src="/img/SigNozLogo-orange.svg"/>\n <span class="text-[17.111px] font-medium">SigNoz</span>\n </a>\n <div class="hidden items-center gap-x-6 lg:flex">\n <div class="flex items-center">\n <button class="z-10 aria-expanded:scale-[0.97] aria-expanded:opacity-70 subpixel-antialiased truncate px-1.5 py-1 text-sm font-extralight hover:text-signoz_robin-500" data-slot="trigger" aria-haspopup="true" aria-expanded="false" id="react-aria-:R1ipbara:" type="button" data-headlessui-state="">\n <div class="flex items-center">\n Product\n <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down ml-1 transform transition-transform duration-300 ease-in-out rotate-0">\n <path d="m6 9 6 6 6-6"></path>\n </svg>\n </div>\n </button>\n </div>\n <a class="flex items-center truncate px-1.5 py-1 text-sm font-normal hover:text-signoz_robin-500" href="/docs/">Documentation</a>\n <div class="flex items-center">\n <button class="z-10 aria-expanded:scale-[0.97] aria-expanded:opacity-70 subpixel-antialiased truncate px-1.5 py-1 text-sm !font-extralight leading-7 text-signoz_vanilla-100 hover:text-signoz_robin-500" data-slot="trigger" aria-haspopup="true" aria-expanded="false" id="react-aria-:R3ipbara:" type="button" data-headlessui-state="">\n <div class="flex items-center">\n Resources\n <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down ml-1 transform transition-transform duration-300 ease-in-out rotate-0">\n <path d="m6 9 6 6 6-6"></path>\n </svg>\n </div>\n </button>\n </div>\n <a class="flex items-center truncate px-1.5 py-1 text-sm font-normal hover:text-signoz_robin-500" href="/pricing/">Pricing</a>\n <a class="flex items-center truncate px-1.5 py-1 text-sm font-normal hover:text-signoz_robin-500" href="/case-study/">Customer Stories</a>\n </div>\n </div>\n <div class="flex justify-end lg:hidden">\n <button type="button" class="-m-2.5 inline-flex items-center justify-center rounded-md p-2.5">\n <span class="sr-only">Open main menu</span>\n <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="h-6 w-6">\n <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"></path>\n </svg>\n </button>\n </div>\n <div class="hidden gap-3 lg:flex lg:flex-1 lg:justify-end">\n <button aria-label="Search" class="px-2 py-2 bg-signoz_slate-500 rounded-full">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-search">\n <circle cx="11" cy="11" r="8"></circle>\n <path d="m21 21-4.3-4.3"></path>\n </svg>\n </button>\n <button id="btn-get-started-website-navbar" class="start-free-trial-btn mx-2 flex h-8 items-center justify-center gap-1.5 truncate rounded-full px-4 py-2 pl-4 pr-3 text-center text-sm font-medium not-italic leading-5 text-white no-underline outline-none hover:text-white" type="button" data-headlessui-state="">\n <a class="flex-center" href="/teams/">\n Try SigNoz Cloud \n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right">\n <path d="M5 12h14"></path>\n <path d="m12 5 7 7-7 7"></path>\n </svg>\n </a>\n </button>\n </div>\n </nav>\n <span hidden="" style="position:fixed;top:1px;left:1px;width:1px;height:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;display:none"></span>\n </header>\n </div>\n <main class="mb-auto mt-[48px]">\n <main class="">\n <section class="relative mx-auto">\n <div class="progress-bar fixed left-0 right-0 top-[52px] z-30 w-full">\n <div class="h-1 bg-indigo-500" style="width:0%"></div>\n </div>\n <div class="max-sm:px-4 doc overflow-clip">\n <div class="doc-sidenav border-r border-signoz_slate-500"></div>\n <div class="doc-content md:px-0 lg:px-4">\n <article class="prose prose-slate max-w-none py-6 dark:prose-invert">\n <div class="doc">\n <div class="doc-content">\n <h2 class="mt-2 text-3xl">Docker Swarm</h2>\n <div class="admonition border-l-4 border-green-400 bg-green-900 p-4">\n <div class="flex items-center mb-2">\n <span class="font-bold mr-2 text-xl text-white">πŸ’‘\n \x3C!-- -->\n \x3C!-- -->\n Tip</span>\n </div>\n <div class="text-gray-300">\n <p>The easiest way to run SigNoz is to use SigNoz Cloud - no installation, maintenance, or scaling needed.</p>\n <p>\n New users get 30 days of unlimited access to all features. Click <a href="/teams/">here</a>\n to sign up.\n </p>\n </div>\n </div>\n <p>Once you have successfully installed SigNoz on Docker Swarm, the following sections provide an overview of the activities that are required to successfully operate SigNoz.</p>\n <h2 class="content-header" id="stopstart-signoz-cluster">\n <a href="#stopstart-signoz-cluster" aria-hidden="true" tabindex="-1">\n <span class="content-header-link">\n <svg class="h-5 linkicon w-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">\n <path d="M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z"></path>\n <path d="M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z"></path>\n </svg>\n </span>\n </a>\n Stop/Start SigNoz Cluster\n </h2>\n <p>To stop SigNoz cluster:</p>\n <div class="relative">\n <pre>\n <code class="language-bash code-highlight">\n <span class="code-line">\n <span class="token function">docker</span>\n stack <span class="token function">rm</span>\n signoz\n\n </span>\n </code>\n </pre>\n </div>\n <p>To start/resume SigNoz cluster:</p>\n <div class="relative">\n <pre>\n <code class="language-bash code-highlight">\n <span class="code-line">\n <span class="token function">docker</span>\n stack deploy <span class="token parameter variable">-c</span>\n docker-swarm/clickhouse-setup/docker-compose.yaml signoz\n\n </span>\n </code>\n </pre>\n </div>\n <div class="admonition border-l-4 border-gray-400 bg-gray-900 p-4">\n <div class="flex items-center mb-2">\n <span class="font-bold mr-2 text-xl text-white">πŸ“\n \x3C!-- -->\n \x3C!-- -->\n Note</span>\n </div>\n <div class="text-gray-300">\n <p>The newly created SigNoz cluster should mount on the existing local path in the node.</p>\n </div>\n </div>\n <h2 class="content-header" id="upgrade-signoz-cluster">\n <a href="#upgrade-signoz-cluster" aria-hidden="true" tabindex="-1">\n <span class="content-header-link">\n <svg class="h-5 linkicon w-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">\n <path d="M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z"></path>\n <path d="M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z"></path>\n </svg>\n </span>\n </a>\n Upgrade SigNoz Cluster\n </h2>\n <p>\n To upgrade, you can manually update the image tag for <code>query-service</code>\n , <code>frontend</code>\n and <code>otel-collector</code>\n . And run the command to start the cluster:\n </p>\n <div class="relative">\n <pre>\n <code class="language-bash code-highlight">\n <span class="code-line">\n <span class="token function">docker</span>\n stack deploy <span class="token parameter variable">-c</span>\n docker-swarm/clickhouse-setup/docker-compose.yaml signoz\n\n </span>\n </code>\n </pre>\n </div>\n <div class="admonition border-l-4 border-gray-400 bg-gray-900 p-4">\n <div class="flex items-center mb-2">\n <span class="font-bold mr-2 text-xl text-white">πŸ“\n \x3C!-- -->\n \x3C!-- -->\n Note</span>\n </div>\n <div class="text-gray-300">\n <ul>\n <li>Be careful! There might be configuration changes and version mismatch.</li>\n <li>\n Before upgrading, checkout to the release tag: for example <code>git checkout v0.6.1</code>\n and compare the Docker Compose YAML and config files.\n </li>\n </ul>\n </div>\n </div>\n <h2 class="content-header" id="uninstall-signoz-cluster">\n <a href="#uninstall-signoz-cluster" aria-hidden="true" tabindex="-1">\n <span class="content-header-link">\n <svg class="h-5 linkicon w-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">\n <path d="M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z"></path>\n <path d="M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z"></path>\n </svg>\n </span>\n </a>\n Uninstall SigNoz Cluster\n </h2>\n <p>To delete/uninstall SigNoz cluster:</p>\n <div class="relative">\n <pre>\n <code class="language-bash code-highlight">\n <span class="code-line">\n <span class="token function">docker</span>\n stack <span class="token function">rm</span>\n signoz\n\n </span>\n </code>\n </pre>\n </div>\n <h2 class="content-header" id="scale-up-signoz-cluster">\n <a href="#scale-up-signoz-cluster" aria-hidden="true" tabindex="-1">\n <span class="content-header-link">\n <svg class="h-5 linkicon w-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">\n <path d="M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z"></path>\n <path d="M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z"></path>\n </svg>\n </span>\n </a>\n Scale Up SigNoz Cluster\n </h2>\n <p>\n SigNoz uses the <a target="_blank" rel="noopener noreferrer" href="https://github.com/open-telemetry/opentelemetry-collector">OpenTelemetry Collector</a>\n to ingest data. By default, the instructions in the <a href="/docs/install/docker-swarm/">Install SigNoz on Docker Swarm</a>\n document create three replicas, and each replica can handle 50K spans per second. To handle an increased load, perform the following steps:\n </p>\n <ol>\n <li>\n <p>\n Open the <code>deploy/docker-swarm/clickhouse-setup/docker-compose.yaml</code>\n file in a plain-text editor.\n </p>\n </li>\n <li>\n <p>\n In the <code>services.otel-collector.deploy.replicas</code>\n field, enter the number of replicas you wish to create. The following example creates four replicas:\n </p>\n </li>\n </ol>\n <div>\n <div aria-owns="rmiz-modal-" data-rmiz="">\n <div data-rmiz-content="not-found" style="visibility:visible">\n <img alt="Open Telemetry Collector - Create four replicas" loading="lazy" width="1464" height="762" decoding="async" data-nimg="1" style="color:transparent" srcSet="/_next/image/?url=%2Fimg%2Fscale-up-otel.webp&amp;w=1920&amp;q=75 1x, /_next/image/?url=%2Fimg%2Fscale-up-otel.webp&amp;w=3840&amp;q=75 2x" src="/_next/image/?url=%2Fimg%2Fscale-up-otel.webp&amp;w=3840&amp;q=75"/>\n </div>\n </div>\n </div>\n <ol start="3">\n <li>\n <p>\n Update the <code>signoz</code>\n stack by entering the following command:\n </p>\n <div class="relative">\n <pre>\n <code class="language-bash code-highlight"></code>\n </pre>\n </div>\n </li>\n </ol>\n <p>docker stack deploy -c docker-swarm/clickhouse-setup/docker-compose.yaml signoz</p>\n <div class="relative">\n <pre>\n <code class="code-highlight language-js"></code>\n </pre>\n </div>\n <div class="PageFeedback_feedbackContainer___tGjJ">\n <div class="PageFeedback_separatorLine__DIBW2"></div>\n <h3 class="PageFeedback_title__bvKx6">Was this page helpful?</h3>\n <div class="PageFeedback_buttonGroup__T4R6c">\n <button class="PageFeedback_button__A_6sn">πŸ‘ Yes</button>\n <button class="PageFeedback_button__A_6sn">πŸ‘Ž No</button>\n </div>\n </div>\n <div class="docs-prev-next-nav mt-16 flex items-center justify-between">\n <a class="docs-prev rounded bg-signoz_slate-500 p-2 px-4 no-underline" href="/docs/operate/docker-standalone/">\n <div class="mb-2 text-xs font-bold">Prev</div>\n <div class="flex items-center justify-center gap-1 text-sm font-bold">\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevrons-left">\n <path d="m11 17-5-5 5-5"></path>\n <path d="m18 17-5-5 5-5"></path>\n </svg>\n \x3C!-- -->\n Docker Standalone\n </div>\n </a>\n <a class="docs-next rounded bg-signoz_slate-500 p-2 px-4 no-underline" href="/docs/operate/kubernetes/">\n <div class="mb-2 flex justify-end text-xs font-bold">Next</div>\n <div class="flex items-center justify-end gap-1 text-sm font-bold">\n Kubernetes\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevrons-right">\n <path d="m6 17 5-5-5-5"></path>\n <path d="m13 17 5-5-5-5"></path>\n </svg>\n </div>\n </a>\n </div>\n </div>\n <div class="doc-toc">\n <div class="mb-3 text-xs uppercase">On this page </div>\n <div class="doc-toc-items border-l border-signoz_slate-500 pl-3 ">\n <div class="doc-toc-item">\n <a data-level="2" href="#stopstart-signoz-cluster" class="mb-1 line-clamp-2 text-xs">Stop/Start SigNoz Cluster</a>\n </div>\n <div class="doc-toc-item">\n <a data-level="2" href="#upgrade-signoz-cluster" class="mb-1 line-clamp-2 text-xs">Upgrade SigNoz Cluster</a>\n </div>\n <div class="doc-toc-item">\n <a data-level="2" href="#uninstall-signoz-cluster" class="mb-1 line-clamp-2 text-xs">Uninstall SigNoz Cluster</a>\n </div>\n <div class="doc-toc-item">\n <a data-level="2" href="#scale-up-signoz-cluster" class="mb-1 line-clamp-2 text-xs">Scale Up SigNoz Cluster</a>\n </div>\n </div>\n </div>\n </div>\n </article>\n </div>\n </div>\n </section>\n </main>\n </main>\n <div class="flex flex-col justify-center border-t border-solid border-gray-900 z-[10] bg-signoz_ink-500 backdrop-blur-md bg-opacity-70">\n <div class="flex w-full items-center justify-center bg-opacity-70 px-16 py-14 max-md:max-w-full max-md:px-5">\n <div class="container w-full max-w-[1200px] justify-between max-md:max-w-full">\n <div class="flex gap-5 max-md:flex-col max-md:gap-0">\n <div class="flex w-3/12 flex-col max-md:ml-0 max-md:w-full">\n <div class="flex flex-col pb-2.5 text-sm tracking-wide text-stone-300 max-md:mt-10">\n <div class="text-sm font-semibold uppercase leading-5 tracking-wide">Docs</div>\n <a class="mt-5 hover:underline" href="/docs/">Introduction</a>\n <a class="mt-5 hover:underline" href="/docs/contributing/">Contributing</a>\n <div class="mt-5 flex items-center gap-2 pr-7 hover:underline max-md:pr-5">\n <a target="_blank" href="https://knowledgebase.signoz.io/kb">Knowledge Base</a>\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right">\n <path d="M7 7h10v10"></path>\n <path d="M7 17 17 7"></path>\n </svg>\n </div>\n <a class="mt-5 hover:underline" href="/api_reference/">SigNoz API</a>\n </div>\n </div>\n <div class="ml-5 flex w-3/12 flex-col max-md:ml-0 max-md:w-full">\n <div class="flex grow flex-col self-stretch pb-20 text-sm tracking-wide text-stone-300 max-md:mt-10">\n <div class="text-sm font-semibold uppercase leading-5 tracking-wide">Community</div>\n <div class="mt-5 flex items-center gap-2 pr-7 hover:underline max-md:pr-5">\n <a href="/support/">Support</a>\n </div>\n <div class="mt-5 flex items-center gap-2 pr-7 hover:underline max-md:pr-5">\n <a target="_blank" href="https://signoz.io/slack">Slack</a>\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right">\n <path d="M7 7h10v10"></path>\n <path d="M7 17 17 7"></path>\n </svg>\n </div>\n <div class="mt-5 flex items-center gap-2 whitespace-nowrap pr-8 hover:underline max-md:pr-5">\n <a target="_blank" href="https://twitter.com/SigNozHQ">Twitter</a>\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right">\n <path d="M7 7h10v10"></path>\n <path d="M7 17 17 7"></path>\n </svg>\n </div>\n <div class="mt-5 flex items-center gap-2 whitespace-nowrap pr-8 hover:underline max-md:pr-5">\n <a target="_blank" href="https://community-chat.signoz.io/">Community Archive</a>\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right">\n <path d="M7 7h10v10"></path>\n <path d="M7 17 17 7"></path>\n </svg>\n </div>\n <div class="mt-5 flex items-center gap-2 pr-7 hover:underline max-md:pr-5">\n <a href="/changelog/">Changelog</a>\n </div>\n </div>\n </div>\n <div class="ml-5 flex w-3/12 flex-col max-md:ml-0 max-md:w-full">\n <div class="flex grow flex-col self-stretch pb-20 text-sm tracking-wide text-stone-300 max-md:mt-10">\n <div class="text-sm font-semibold uppercase leading-5 tracking-wide">More</div>\n <a class="mt-5 hover:underline" href="/product-comparison/signoz-vs-datadog/">SigNoz vs Datadog</a>\n <a class="mt-5 hover:underline" href="/product-comparison/signoz-vs-newrelic/">SigNoz vs New Relic</a>\n <a class="mt-5 hover:underline" href="/product-comparison/signoz-vs-grafana/">SigNoz vs Grafana</a>\n <a class="mt-5 hover:underline" href="/product-comparison/signoz-vs-dynatrace/">SigNoz vs Dynatrace</a>\n <div class="mt-5 flex items-center gap-2 whitespace-nowrap pr-8 hover:underline max-md:pr-5">\n <a target="_blank" href="https://jobs.gem.com/signoz">Careers</a>\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right">\n <path d="M7 7h10v10"></path>\n <path d="M7 17 17 7"></path>\n </svg>\n </div>\n <a class="mt-5 hover:underline " href="/about-us/">About</a>\n <a class="mt-5 hover:underline" href="/terms-of-service/">Terms</a>\n <a class="mt-5 hover:underline" href="/privacy/">Privacy</a>\n <a target="_blank" class="mt-5 hover:underline" href="https://trust.signoz.io/">Security &amp;Compliance</a>\n </div>\n </div>\n <div class="ml-5 flex w-3/12 flex-col max-md:ml-0 max-md:w-full">\n <div class="flex flex-col items-end shadow-sm max-md:mt-10">\n <div class="flex items-center justify-between gap-2 self-end whitespace-nowrap text-center text-lg font-medium leading-5 text-white">\n <img alt="" loading="lazy" width="50" height="50" decoding="async" data-nimg="1" class="h-5 w-auto" style="color:transparent" src="/img/SigNozLogo-orange.svg"/>\n <div class="font-satoshi-bold font-medium">SigNoz</div>\n </div>\n <div class="mt-5 items-end justify-center rounded text-sm leading-5 text-emerald-300">All systems operational</div>\n <div class="mt-5 flex items-end justify-between gap-4 py-2 footer-icons">\n <a target="_blank" aria-label="SigNoz Github URL" href="https://github.com/SigNoz">\n <svg xmlns="http://www.w3.org/2000/svg" class="fill-signoz_vanilla-400" viewBox="0 0 496 512">\n <path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path>\n </svg>\n </a>\n <a target="_blank" aria-label="SigNoz LinkedIN URL" href="https://www.linkedin.com/company/signozio/">\n <svg xmlns="http://www.w3.org/2000/svg" class="fill-signoz_vanilla-400" viewBox="0 0 448 512">\n <path fill="#C0C1C3" d="M100.3 448H7.4V148.9h92.9zM53.8 108.1C24.1 108.1 0 83.5 0 53.8a53.8 53.8 0 0 1 107.6 0c0 29.7-24.1 54.3-53.8 54.3zM447.9 448h-92.7V302.4c0-34.7-.7-79.2-48.3-79.2-48.3 0-55.7 37.7-55.7 76.7V448h-92.8V148.9h89.1v40.8h1.3c12.4-23.5 42.7-48.3 87.9-48.3 94 0 111.3 61.9 111.3 142.3V448z"></path>\n </svg>\n </a>\n <a target="_blank" aria-label="SigNoz Slack Connect URL" href="https://signoz.io/slack">\n <svg xmlns="http://www.w3.org/2000/svg" class="fill-signoz_vanilla-400" viewBox="0 0 448 512">\n <path fill="#C0C1C3" d="M94.1 315.1c0 25.9-21.2 47.1-47.1 47.1S0 341 0 315.1c0-25.9 21.2-47.1 47.1-47.1h47.1v47.1zm23.7 0c0-25.9 21.2-47.1 47.1-47.1s47.1 21.2 47.1 47.1v117.8c0 25.9-21.2 47.1-47.1 47.1s-47.1-21.2-47.1-47.1V315.1zm47.1-189c-25.9 0-47.1-21.2-47.1-47.1S139 32 164.9 32s47.1 21.2 47.1 47.1v47.1H164.9zm0 23.7c25.9 0 47.1 21.2 47.1 47.1s-21.2 47.1-47.1 47.1H47.1C21.2 244 0 222.8 0 196.9s21.2-47.1 47.1-47.1H164.9zm189 47.1c0-25.9 21.2-47.1 47.1-47.1 25.9 0 47.1 21.2 47.1 47.1s-21.2 47.1-47.1 47.1h-47.1V196.9zm-23.7 0c0 25.9-21.2 47.1-47.1 47.1-25.9 0-47.1-21.2-47.1-47.1V79.1c0-25.9 21.2-47.1 47.1-47.1 25.9 0 47.1 21.2 47.1 47.1V196.9zM283.1 385.9c25.9 0 47.1 21.2 47.1 47.1 0 25.9-21.2 47.1-47.1 47.1-25.9 0-47.1-21.2-47.1-47.1v-47.1h47.1zm0-23.7c-25.9 0-47.1-21.2-47.1-47.1 0-25.9 21.2-47.1 47.1-47.1h117.8c25.9 0 47.1 21.2 47.1 47.1 0 25.9-21.2 47.1-47.1 47.1H283.1z"></path>\n </svg>\n </a>\n <a target="_blank" aria-label="SigNoz Twitter URL" href="https://twitter.com/SigNozHQ">\n <svg xmlns="http://www.w3.org/2000/svg" class="fill-signoz_vanilla-400" viewBox="0 0 512 512">\n <path fill="#C0C1C3" d="M459.4 151.7c.3 4.5 .3 9.1 .3 13.6 0 138.7-105.6 298.6-298.6 298.6-59.5 0-114.7-17.2-161.1-47.1 8.4 1 16.6 1.3 25.3 1.3 49.1 0 94.2-16.6 130.3-44.8-46.1-1-84.8-31.2-98.1-72.8 6.5 1 13 1.6 19.8 1.6 9.4 0 18.8-1.3 27.6-3.6-48.1-9.7-84.1-52-84.1-103v-1.3c14 7.8 30.2 12.7 47.4 13.3-28.3-18.8-46.8-51-46.8-87.4 0-19.5 5.2-37.4 14.3-53 51.7 63.7 129.3 105.3 216.4 109.8-1.6-7.8-2.6-15.9-2.6-24 0-57.8 46.8-104.9 104.9-104.9 30.2 0 57.5 12.7 76.7 33.1 23.7-4.5 46.5-13.3 66.6-25.3-7.8 24.4-24.4 44.8-46.1 57.8 21.1-2.3 41.6-8.1 60.4-16.2-14.3 20.8-32.2 39.3-52.6 54.3z"></path>\n </svg>\n </a>\n <a target="_blank" aria-label="SigNoz Youtube Channel URL" href="https://www.youtube.com/@signoz">\n <svg xmlns="http://www.w3.org/2000/svg" class="fill-signoz_vanilla-400" viewBox="0 0 576 512">\n <path d="M549.7 124.1c-6.3-23.7-24.8-42.3-48.3-48.6C458.8 64 288 64 288 64S117.2 64 74.6 75.5c-23.5 6.3-42 24.9-48.3 48.6-11.4 42.9-11.4 132.3-11.4 132.3s0 89.4 11.4 132.3c6.3 23.7 24.8 41.5 48.3 47.8C117.2 448 288 448 288 448s170.8 0 213.4-11.5c23.5-6.3 42-24.2 48.3-47.8 11.4-42.9 11.4-132.3 11.4-132.3s0-89.4-11.4-132.3zm-317.5 213.5V175.2l142.7 81.2-142.7 81.2z"></path>\n </svg>\n </a>\n </div>\n <div class="mt-5 flex flex-row gap-8">\n <img class="opacity-60 hover:opacity-100 cursor-pointer" src="/svgs/icons/hipaa.svg" width="90" height="90" alt=""/>\n <img class="shadow-[0px_0_40px_0_rgba(255,255,255,0.27)] rounded-full opacity-60 hover:opacity-100 transition-opacity cursor-pointer" src="/svgs/icons/SOC-2.svg" width="60" height="60" alt=""/>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n \x3Cscript src="/_next/static/chunks/webpack-fd8ac6b7ecd741f2.js" async="">\x3C/script>\n \x3Cscript>\n (self.__next_f = self.__next_f || []).push([0]);\n self.__next_f.push([2, null])\n \x3C/script>\n \x3Cscript>\n self.__next_f.push([1, "1:HL["/_next/static/media/a34f9d1faa5f3315-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]\n2:HL["/_next/static/css/dc440bb5df3a2a20.css","style"]\n3:HL["/_next/static/css/96453cad2522e5b6.css","style"]\n4:HL["/_next/static/css/7e9926f1811c58a4.css","style"]\n5:HL["/_next/static/css/0e73fdc06d8f3d28.css","style"]\n6:HL["/_next/static/css/5530fdfe2817e998.css","style"]\n"])\n \x3C/script>\n \x3Cscript>\n self.__next_f.push([1, "7:I[95751,[],""]\na:I[39275,[],""]\nc:I[61343,[],""]\nd:I[6709,["231","static/chunks/231-548ba71c7495df73.js","5195","static/chunks/5195-b5571fdee73263ae.js","3998","static/chunks/app/docs/layout-6b3055e085554812.js"],"default"]\ne:I[27640,["231","static/chunks/231-548ba71c7495df73.js","8032","static/chunks/8032-14ad89cc247326be.js","6648","static/chunks/6648-ad581d791656821c.js","9955","static/chunks/9955-d2e26e97f84b5584.js","3284","static/chunks/3284-f8e8685fda3e660b.js","1510","static/chunks/1510-58126d0ea9869b6a.js","8279","static/chunks/8279-af16984c3178bf87.js","8546","static/chunks/8546-37038ae8418f7528.js","5195","static/chunks/5195-b5571fdee73263ae.js","3185","static/chunks/app/layout-44a592a2d715aed2.js"],"GoogleTagManager"]\nf:I[8700,["231","static/chunks/231-548ba71c7495df73.js","8032","static/chunks/8032-14ad89cc247326be.js","6648","static/chunks/6648-ad581d791656821c.js","9955","static/chunks/9955-d2e26e97f84b5584.js","3284","static/chunks/3284-f8e8685fda3e660b.js","1510","static/chunks/1510-58126d0ea9869b6a.js","8279","static/chunks/8279-af16984c3178bf87.js","8546","static/chunks/8546-37038ae8418f7528.js","5195","static/chunks/5195-b5571fdee73263ae.js","3185","static/chunks/app/layout-44a592a2d715aed2.js"],"ThemeProviders"]\n10:I[53345,["231","static/chunks/231-548ba71c7495df73.js","8032","static/chunks/8032-14ad89cc247326be.js","6648","static/chunks/6648-ad581d791656821c.js","9955","static/chunks/9955-d2e26e97f84b5584.js","3284","static/chunks/3284-f8e8685fda3e660b.js","1510","static/chunks/1510-58126d0ea9869b6a.js","8279","static/chunks/8279-af16984c3178bf87.js","8546","static/chunks/8546-37038ae8418f7528.js","5195","static/chunks/5195-b5571fdee73263ae.js","3185","static/chunks/app/layout-44a592a2d715aed2.js"],"AlgoliaSearchProvider"]\n11:I[74462,["231","static/chunks/231-548ba71c7495df73.js","8032","static/chunks/8032-14ad89cc247326be.js","6648","static/chunks/6648-ad581d791656821c.js","9955","static/chunks/9955-d2e26e97f84b5584.js","3284","static/chunks/3284-f8e8685fda3e660b.js","1510","static/chunks"])\n \x3C/script>\n \x3Cscript>\n self.__next_f.push([1, "/1510-58126d0ea9869b6a.js","8279","static/chunks/8279-af16984c3178bf87.js","8546","static/chunks/8546-37038ae8418f7528.js","5195","static/chunks/5195-b5571fdee73263ae.js","3185","static/chunks/app/layout-44a592a2d715aed2.js"],"default"]\n12:I[231,["231","static/chunks/231-548ba71c7495df73.js","6648","static/chunks/6648-ad581d791656821c.js","9448","static/chunks/9448-374795341a6afe73.js","5195","static/chunks/5195-b5571fdee73263ae.js","6687","static/chunks/app/docs/%5B...slug%5D/page-5ec83f06ca67a50a.js"],""]\n13:I[31206,["231","static/chunks/231-548ba71c7495df73.js","8032","static/chunks/8032-14ad89cc247326be.js","6648","static/chunks/6648-ad581d791656821c.js","9955","static/chunks/9955-d2e26e97f84b5584.js","3284","static/chunks/3284-f8e8685fda3e660b.js","1510","static/chunks/1510-58126d0ea9869b6a.js","8279","static/chunks/8279-af16984c3178bf87.js","8546","static/chunks/8546-37038ae8418f7528.js","5195","static/chunks/5195-b5571fdee73263ae.js","3185","static/chunks/app/layout-44a592a2d715aed2.js"],"default"]\n15:I[76130,[],""]\nb:["slug","operate/docker-swarm","c"]\n16:[]\n"])\n \x3C/script>\n \x3Cscript>\n self.__next_f.push([1, "0:[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/dc440bb5df3a2a20.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/96453cad2522e5b6.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","2",{"rel":"stylesheet","href":"/_next/static/css/7e9926f1811c58a4.css","precedence":"next","crossOrigin":"$undefined"}]],["$","$L7",null,{"buildId":"HORH3B7AXoX8ufSz6zuhr","assetPrefix":"","initialCanonicalUrl":"/docs/operate/docker-swarm/","initialTree":["",{"children":["docs",{"children":[["slug","operate/docker-swarm","c"],{"children":["__PAGE__?{\\"slug\\":[\\"operate\\",\\"docker-swarm\\"]}",{}]}]}]},"$undefined","$undefined",true],"initialSeedData":["",{"children":["docs",{"children":[["slug","operate/docker-swarm","c"],{"children":["__PAGE__",{},[["$L8","$L9"],null],null]},["$","$La",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children","$b","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$Lc",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/5530fdfe2817e998.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},[["$","$Ld",null,{"children":["$","$La",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$Lc",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],"params":{}}],null],null]},[["$","html",null,{"lang":"en-us","className":"__className_36bd41 scroll-smooth","suppressHydrationWarning":true,"children":[["$","$Le",null,{"gtmId":"GTM-N9B6D4H"}],["$","link",null,{"rel":"apple-touch-icon","sizes":"76x76","href":"/static/favicons/apple-touch-icon.png"}],["$","link",null,{"rel":"icon","type":"image/png","sizes":"32x32","href":"/static/favicons/favicon-32x32.png"}],["$","link",null,{"rel":"icon","type":"image/png","sizes":"16x16","href":"/static/favicons/favicon-16x16.png"}],["$","link",null,{"rel":"manifest","href":"/static/favicons/site.webmanifest"}],["$","link",null,{"rel":"mask-icon","href":"/static/favicons/safari-pinned-tab.svg","color":"#5bbad5"}],["$","meta",null,{"name":"msapplication-TileColor","content":"#000000"}],["$","meta",null,{"name":"theme-color","media":"(prefers-color-scheme: light)","content":"#fff"}],["$","meta",null,{"name":"theme-color","media":"(prefers-color-scheme: dark)","content":"#000"}],["$","link",null,{"rel":"alternate","type":"application/rss+xml","href":"/feed.xml"}],["$","body",null,{"className":"pl-[calc(100vw-100%)] text-white antialiased","children":[["$","noscript",null,{"children":["$","iframe",null,{"src":"https://www.googletagmanager.com/ns.html?id=GTM-N9B6D4H","height":"0","width":"0","style":{"display":"none","visibility":"hidden"}}]}],["$","$Lf",null,{"children":["$","section",null,{"className":"relative mx-auto","children":["$","div",null,{"className":"relative flex h-screen flex-col justify-between ","children":[["$","$L10",null,{"algoliaConfig":{"appId":"E88QYIQ6K4","apiKey":"1061c173ae001d5f5aaa4f0354e373a0","indexName":"signoz"},"children":[["$","$L11",null,{}],["$","main",null,{"className":"mb-auto mt-[48px]","children":["$","$La",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$Lc",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":["$","div",null,{"className":"flex flex-col items-start justify-start py-16 md:flex-row md:items-center md:justify-center md:space-x-6","children":[["$","div",null,{"className":"space-x-2 pb-8 pt-6 md:space-y-5","children":["$","h1",null,{"className":"text-6xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 md:border-r-2 md:px-6 md:text-8xl md:leading-14","children":"404"}]}],["$","div",null,{"className":"max-w-md","children":[["$","p",null,{"className":"mb-4 text-xl font-bold leading-normal md:text-2xl","children":"Sorry we couldn't find this page."}],["$","p",null,{"className":"mb-8","children":"But don't worry, you can find plenty of other things on our homepage."}],["$","$L12",null,{"href":"/","className":"focus:shadow-outline-blue inline rounded-lg border border-transparent bg-blue-600 px-4 py-2 text-sm font-medium leading-5 text-white shadow transition-colors duration-150 hover:bg-blue-700 focus:outline-none dark:hover:bg-blue-500","children":"Back to homepage"}]]}]]}],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/0e73fdc06d8f3d28.css","precedence":"next","crossOrigin":"$undefined"}]]}]}]]}],["$","$L13",null,{}]]}]}]}]]}]]}],null],null],"couldBeIntercepted":false,"initialHead":[false,"$L14"],"globalErrorComponent":"$15","missingSlots":"$W16"}]]\n"])\n \x3C/script>\n \x3Cscript>\n self.__next_f.push([1, "17:I[40408,["231","static/chunks/231-548ba71c7495df73.js","6648","static/chunks/6648-ad581d791656821c.js","9448","static/chunks/9448-374795341a6afe73.js","5195","static/chunks/5195-b5571fdee73263ae.js","6687","static/chunks/app/docs/%5B...slug%5D/page-5ec83f06ca67a50a.js"],"default"]\n18:I[20356,["231","static/chunks/231-548ba71c7495df73.js","6648","static/chunks/6648-ad581d791656821c.js","9448","static/chunks/9448-374795341a6afe73.js","5195","static/chunks/5195-b5571fdee73263ae.js","6687","static/chunks/app/docs/%5B...slug%5D/page-5ec83f06ca67a50a.js"],"default"]\n19:I[33943,["231","static/chunks/231-548ba71c7495df73.js","6648","static/chunks/6648-ad581d791656821c.js","9448","static/chunks/9448-374795341a6afe73.js","5195","static/chunks/5195-b5571fdee73263ae.js","6687","static/chunks/app/docs/%5B...slug%5D/page-5ec83f06ca67a50a.js"],"default"]\n1a:I[47502,["231","static/chunks/231-548ba71c7495df73.js","6648","static/chunks/6648-ad581d791656821c.js","9448","static/chunks/9448-374795341a6afe73.js","5195","static/chunks/5195-b5571fdee73263ae.js","6687","static/chunks/app/docs/%5B...slug%5D/page-5ec83f06ca67a50a.js"],"default"]\n"])\n \x3C/script>\n \x3Cscript>\n self.__next_f.push([1, "9:["$","div",null,{"className":"doc","children":[["$","div",null,{"className":"doc-content","children":[["$","h2",null,{"className":"mt-2 text-3xl","children":"Docker Swarm"}],[["$","div",null,{"className":"admonition border-l-4 border-green-400 bg-green-900 p-4","children":[["$","div",null,{"className":"flex items-center mb-2","children":["$","span",null,{"className":"font-bold mr-2 text-xl text-white","children":["πŸ’‘"," ","Tip"]}]}],["$","div",null,{"className":"text-gray-300","children":[["$","p",null,{"children":"The easiest way to run SigNoz is to use SigNoz Cloud - no installation, maintenance, or scaling needed."}],["$","p",null,{"children":["New users get 30 days of unlimited access to all features. Click ",["$","a",null,{"href":"/teams/","children":"here"}]," to sign up."]}]]}]]}],["$","p",null,{"children":"Once you have successfully installed SigNoz on Docker Swarm, the following sections provide an overview of the activities that are required to successfully operate SigNoz."}],["$","h2",null,{"className":"content-header","id":"stopstart-signoz-cluster","children":[["$","a",null,{"href":"#stopstart-signoz-cluster","aria-hidden":"true","tabIndex":"-1","children":["$","span",null,{"className":"content-header-link","children":["$","svg",null,{"className":"h-5 linkicon w-5","fill":"currentColor","viewBox":"0 0 20 20","xmlns":"http://www.w3.org/2000/svg","children":[["$","path",null,{"d":"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z"}],["$","path",null,{"d":"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z"}]]}]}]}],"Stop/Start SigNoz Cluster"]}],["$","p",null,{"children":"To stop SigNoz cluster:"}],["$","$L17",null,{"className":"language-bash","children":["$","code",null,{"className":"language-bash code-highlight","children":["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token function","children":"docker"}]," stack ",["$","span",null,{"className":"token function","children":"rm"}]," signoz\\n"]}]}]}],["$","p",null,{"children":"To start/resume SigNoz cluster:"}],["$","$L17",null,{"className":"language-bash","children":["$","code",null,{"className":"language-bash code-highlight","children":["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token function","children":"docker"}]," stack deploy ",["$","span",null,{"className":"token parameter variable","children":"-c"}]," docker-swarm/clickhouse-setup/docker-compose.yaml signoz\\n"]}]}]}],["$","div",null,{"className":"admonition border-l-4 border-gray-400 bg-gray-900 p-4","children":[["$","div",null,{"className":"flex items-center mb-2","children":["$","span",null,{"className":"font-bold mr-2 text-xl text-white","children":["πŸ“"," ","Note"]}]}],["$","div",null,{"className":"text-gray-300","children":["$","p",null,{"children":"The newly created SigNoz cluster should mount on the existing local path in the node."}]}]]}],["$","h2",null,{"className":"content-header","id":"upgrade-signoz-cluster","children":[["$","a",null,{"href":"#upgrade-signoz-cluster","aria-hidden":"true","tabIndex":"-1","children":["$","span",null,{"className":"content-header-link","children":["$","svg",null,{"className":"h-5 linkicon w-5","fill":"currentColor","viewBox":"0 0 20 20","xmlns":"http://www.w3.org/2000/svg","children":[["$","path",null,{"d":"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z"}],["$","path",null,{"d":"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z"}]]}]}]}],"Upgrade SigNoz Cluster"]}],["$","p",null,{"children":["To upgrade, you can manually update the image tag for ",["$","code",null,{"children":"query-service"}],", ",["$","code",null,{"children":"frontend"}]," and ",["$","code",null,{"children":"otel-collector"}],". And run the command to start the cluster:"]}],["$","$L17",null,{"className":"language-bash","children":["$","code",null,{"className":"language-bash code-highlight","children":["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token function","children":"docker"}]," stack deploy ",["$","span",null,{"className":"token parameter variable","children":"-c"}]," docker-swarm/clickhouse-setup/docker-compose.yaml signoz\\n"]}]}]}],["$","div",null,{"className":"admonition border-l-4 border-gray-400 bg-gray-900 p-4","children":[["$","div",null,{"className":"flex items-center mb-2","children":["$","span",null,{"className":"font-bold mr-2 text-xl text-white","children":["πŸ“"," ","Note"]}]}],["$","div",null,{"className":"text-gray-300","children":["$","ul",null,{"children":[["$","li",null,{"children":"Be careful! There might be configuration changes and version mismatch."}],["$","li",null,{"children":["Before upgrading, checkout to the release tag: for example ",["$","code",null,{"children":"git checkout v0.6.1"}]," and compare the Docker Compose YAML and config files."]}]]}]}]]}],["$","h2",null,{"className":"content-header","id":"uninstall-signoz-cluster","children":[["$","a",null,{"href":"#uninstall-signoz-cluster","aria-hidden":"true","tabIndex":"-1","children":["$","span",null,{"className":"content-header-link","children":["$","svg",null,{"className":"h-5 linkicon w-5","fill":"currentColor","viewBox":"0 0 20 20","xmlns":"http://www.w3.org/2000/svg","children":[["$","path",null,{"d":"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z"}],["$","path",null,{"d":"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z"}]]}]}]}],"Uninstall SigNoz Cluster"]}],["$","p",null,{"children":"To delete/uninstall SigNoz cluster:"}],["$","$L17",null,{"className":"language-bash","children":["$","code",null,{"className":"language-bash code-highlight","children":["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token function","children":"docker"}]," stack ",["$","span",null,{"className":"token function","children":"rm"}]," signoz\\n"]}]}]}],["$","h2",null,{"className":"content-header","id":"scale-up-signoz-cluster","children":[["$","a",null,{"href":"#scale-up-signoz-cluster","aria-hidden":"true","tabIndex":"-1","children":["$","span",null,{"className":"content-header-link","children":["$","svg",null,{"className":"h-5 linkicon w-5","fill":"currentColor","viewBox":"0 0 20 20","xmlns":"http://www.w3.org/2000/svg","children":[["$","path",null,{"d":"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z"}],["$","path",null,{"d":"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z"}]]}]}]}],"Scale Up SigNoz Cluster"]}],["$","p",null,{"children":["SigNoz uses the ",["$","a",null,{"target":"_blank","rel":"noopener noreferrer","href":"https://github.com/open-telemetry/opentelemetry-collector","children":"OpenTelemetry Collector"}]," to ingest data. By default, the instructions in the ",["$","$L12",null,{"href":"/docs/install/docker-swarm","children":"Install SigNoz on Docker Swarm"}]," document create three replicas, and each replica can handle 50K spans per second. To handle an increased load, perform the following steps:"]}],["$","ol",null,{"children":[["$","li",null,{"children":["$","p",null,{"children":["Open the ",["$","code",null,{"children":"deploy/docker-swarm/clickhouse-setup/docker-compose.yaml"}]," file in a plain-text editor."]}]}],["$","li",null,{"children":["$","p",null,{"children":["In the ",["$","code",null,{"children":"services.otel-collector.deploy.replicas"}]," field, enter the number of replicas you wish to create. The following example creates four replicas:"]}]}]]}],["$","div",null,{"children":["$","$L18",null,{"alt":"Open Telemetry Collector - Create four replicas","src":"/img/scale-up-otel.webp","width":"1464","height":"762"}]}],["$","ol",null,{"start":"3","children":["$","li",null,{"children":[["$","p",null,{"children":["Update the ",["$","code",null,{"children":"signoz"}]," stack by entering the following command:"]}],["$","$L17",null,{"className":"language-bash","children":["$","code",null,{"className":"language-bash code-highlight"}]}]]}]}],["$","p",null,{"children":"docker stack deploy -c docker-swarm/clickhouse-setup/docker-compose.yaml signoz"}],["$","$L17",null,{"className":"language-js","children":["$","code",null,{"className":"code-highlight language-js"}]}]],["$","$L19",null,{}],["$","$L1a",null,{}]]}],["$","div",null,{"className":"doc-toc","children":[["$","div",null,{"className":"mb-3 text-xs uppercase","children":" On this page "}],["$","div",null,{"className":"doc-toc-items border-l border-signoz_slate-500 pl-3 ","children":[["$","div","#stopstart-signoz-cluster",{"className":"doc-toc-item","children":["$","a",null,{"data-level":2,"href":"#stopstart-signoz-cluster","className":"mb-1 line-clamp-2 text-xs","children":"Stop/Start SigNoz Cluster"}]}],["$","div","#upgrade-signoz-cluster",{"className":"doc-toc-item","children":["$","a",null,{"data-level":2,"href":"#upgrade-signoz-cluster","className":"mb-1 line-clamp-2 text-xs","children":"Upgrade SigNoz Cluster"}]}],["$","div","#uninstall-signoz-cluster",{"className":"doc-toc-item","children":["$","a",null,{"data-level":2,"href":"#uninstall-signoz-cluster","className":"mb-1 line-clamp-2 text-xs","children":"Uninstall SigNoz Cluster"}]}],["$","div","#scale-up-signoz-cluster",{"className":"doc-toc-item","children":["$","a",null,{"data-level":2,"href":"#scale-up-signoz-cluster","className":"mb-1 line-clamp-2 text-xs","children":"Scale Up SigNoz Cluster"}]}]]}]]}]]}]\n"])\n \x3C/script>\n \x3Cscript>\n self.__next_f.push([1, "14:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Docker Swarm | SigNoz"}],["$","meta","3",{"name":"description","content":"Learn how to operate SigNoz on Docker Swarm"}],["$","meta","4",{"name":"robots","content":"index, follow"}],["$","meta","5",{"name":"googlebot","content":"index, follow, max-video-preview:-1, max-image-preview:large, max-snippet:-1"}],["$","link","6",{"rel":"canonical","href":"https://signoz.io/docs/operate/docker-swarm/"}],["$","link","7",{"rel":"alternate","type":"application/rss+xml","href":"https://signoz.io/feed.xml/"}],["$","meta","8",{"property":"og:title","content":"Docker Swarm"}],["$","meta","9",{"property":"og:description","content":"Learn how to operate SigNoz on Docker Swarm"}],["$","meta","10",{"property":"og:url","content":"https://signoz.io/docs/operate/docker-swarm/"}],["$","meta","11",{"property":"og:site_name","content":"SigNoz"}],["$","meta","12",{"property":"og:locale","content":"en_US"}],["$","meta","13",{"property":"og:type","content":"article"}],["$","meta","14",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","15",{"name":"twitter:title","content":"Docker Swarm"}],["$","meta","16",{"name":"twitter:description","content":"Learn how to operate SigNoz on Docker Swarm"}],["$","meta","17",{"name":"next-size-adjust"}]]\n8:null\n"])\n \x3C/script>\n </body>\n</html>\n`;
+ const options: PageOptions = {
+ onlyIncludeTags: [".doc-content"],
+ removeTags: [
+ "nav",
+ "img",
+ "pre",
+ ".PageFeedback_feedbackContainer___tGjJ",
+ ],
+ };
+ const result = removeUnwantedElements(html, options);
+ expect(result).not.toContain(
+ 'class="PageFeedback_feedbackContainer___tGjJ"',
+ );
+ });
});
diff --git a/apps/api/src/scraper/WebScraper/utils/removeUnwantedElements.ts b/apps/api/src/scraper/WebScraper/utils/removeUnwantedElements.ts
index 7962a4a0b..c2d588c7f 100644
--- a/apps/api/src/scraper/WebScraper/utils/removeUnwantedElements.ts
+++ b/apps/api/src/scraper/WebScraper/utils/removeUnwantedElements.ts
@@ -1,30 +1,31 @@
-import cheerio, { AnyNode, Cheerio } from "cheerio";
+import { AnyNode, Cheerio, load } from "cheerio";
import { PageOptions } from "../../../lib/entities";
import { excludeNonMainTags } from "./excludeTags";
export const removeUnwantedElements = (
html: string,
- pageOptions: PageOptions
+ pageOptions: PageOptions,
) => {
- const soup = cheerio.load(html);
+ let soup = load(html);
if (
pageOptions.onlyIncludeTags &&
pageOptions.onlyIncludeTags.length > 0 &&
- pageOptions.onlyIncludeTags[0] !== ''
+ pageOptions.onlyIncludeTags[0] !== ""
) {
if (typeof pageOptions.onlyIncludeTags === "string") {
pageOptions.onlyIncludeTags = [pageOptions.onlyIncludeTags];
}
if (pageOptions.onlyIncludeTags.length !== 0) {
// Create a new root element to hold the tags to keep
- const newRoot = cheerio.load("<div></div>")("div");
+ const newRoot = load("<div></div>")("div");
pageOptions.onlyIncludeTags.forEach((tag) => {
soup(tag).each((index, element) => {
newRoot.append(soup(element).clone());
});
});
- return newRoot.html();
+
+ soup = load(newRoot.html());
}
}
@@ -33,7 +34,7 @@ export const removeUnwantedElements = (
if (
pageOptions.removeTags &&
pageOptions.removeTags.length > 0 &&
- pageOptions.removeTags[0] !== ''
+ pageOptions.removeTags[0] !== ""
) {
if (typeof pageOptions.removeTags === "string") {
pageOptions.removeTags = [pageOptions.removeTags];
@@ -51,11 +52,11 @@ export const removeUnwantedElements = (
const attributes = element.attribs;
const tagNameMatches = regexPattern.test(element.name);
const attributesMatch = Object.keys(attributes).some((attr) =>
- regexPattern.test(`${attr}="${attributes[attr]}"`)
+ regexPattern.test(`${attr}="${attributes[attr]}"`),
);
if (tag.startsWith("*.")) {
classMatch = Object.keys(attributes).some((attr) =>
- regexPattern.test(`class="${attributes[attr]}"`)
+ regexPattern.test(`class="${attributes[attr]}"`),
);
}
return tagNameMatches || attributesMatch || classMatch;