mirror of
https://github.com/zenlm/zen-code-docs.git
synced 2026-10-30 14:58:40 +00:00
384 lines
208 KiB
HTML
384 lines
208 KiB
HTML
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="image" href="https://assets.alicdn.com/g/qwenweb/qwen-webui-fe/0.0.191/static/favicon.png"/><link rel="stylesheet" href="/qwen-code-docs/_next/static/css/7fba7395046b8eaa.css" data-precedence="next"/><link rel="stylesheet" href="/qwen-code-docs/_next/static/css/04d76539cc2c4ebd.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/qwen-code-docs/_next/static/chunks/webpack-6175f18c4ffcc31c.js"/><script src="/qwen-code-docs/_next/static/chunks/fd9d1056-c4d7023cbe01becc.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/2117-2a033efae9becbf0.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/main-app-96783a02d9726921.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/app/layout-38b548b4f4d27f80.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/c16f53c3-b998f97655e65347.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/1105-e07e82095c5c7b4a.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/5524-d228bcaedae4ecb3.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/2770-e894e62890be5e00.js" async=""></script><script src="/qwen-code-docs/_next/static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js" async=""></script><meta name="theme-color" media="(prefers-color-scheme: light)" content="rgb(250,250,250)"/><meta name="theme-color" media="(prefers-color-scheme: dark)" content="rgb(17,17,17)"/><title>Qwen Code 可观测性指南 | </title><meta name="description" content="x"/><meta name="msapplication-TileColor" content="#fff"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Qwen Code"/><meta name="apple-mobile-web-app-status-bar-style" content="default"/><meta property="og:title" content="Qwen Code 可观测性指南 | "/><meta property="og:description" content="x"/><meta property="og:image" content="https://assets.vercel.com/image/upload/v1572282926/swr/twitter-card.jpg"/><meta name="twitter:card" content="summary"/><meta name="twitter:site" content="@qwenLLM"/><meta name="twitter:title" content="Qwen Code 可观测性指南 | "/><meta name="twitter:description" content="x"/><meta name="twitter:image" content="https://assets.vercel.com/image/upload/v1572282926/swr/twitter-card.jpg"/><style>:root {
|
||
--nextra-primary-hue: 248deg;
|
||
--nextra-primary-saturation: 74%;
|
||
--nextra-primary-lightness: 45%;
|
||
--nextra-bg: 250,250,250;
|
||
--nextra-content-width: 90rem;
|
||
}
|
||
.dark {
|
||
--nextra-primary-hue: 248deg;
|
||
--nextra-primary-saturation: 74%;
|
||
--nextra-primary-lightness: 55%;
|
||
--nextra-bg: 17,17,17;
|
||
}
|
||
::selection {
|
||
background: hsla(var(--nextra-primary-hue),var(--nextra-primary-saturation),var(--nextra-primary-lightness),.3);
|
||
}
|
||
html {
|
||
background: rgb(var(--nextra-bg));
|
||
}</style><script src="/qwen-code-docs/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><script>((e,i,s,n,l,r,d,h)=>{let t=document.documentElement,a=["light","dark"];function c(i){(Array.isArray(e)?e:[e]).forEach(e=>{let s="class"===e,n=s&&r?l.map(e=>r[e]||e):l;s?(t.classList.remove(...n),t.classList.add(r&&r[i]?r[i]:i)):t.setAttribute(e,i)}),h&&a.includes(i)&&(t.style.colorScheme=i)}if(n)c(n);else try{let e=localStorage.getItem(i)||s,n=d&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(n)}catch(e){}})("class","theme","light",null,["light","dark"],null,true,true)</script><a href="#nextra-skip-nav" class="nextra-skip-nav x:sr-only" type="button" data-headlessui-state="">Skip to Content</a><header class="nextra-navbar x:sticky x:top-0 x:z-30 x:w-full x:bg-transparent x:print:hidden x:max-md:[.nextra-banner:not([class$=hidden])~&]:top-(--nextra-banner-height)"><div class="nextra-navbar-blur x:absolute x:-z-1 x:size-full nextra-border x:border-b x:backdrop-blur-md x:bg-nextra-bg/70"></div><nav style="height:var(--nextra-navbar-height)" class="x:mx-auto x:flex x:max-w-(--nextra-content-width) x:items-center x:gap-4 x:pl-[max(env(safe-area-inset-left),1.5rem)] x:pr-[max(env(safe-area-inset-right),1.5rem)] x:justify-end"><a class="x:flex x:items-center x:me-auto x:transition-opacity x:focus-visible:nextra-focus x:hover:opacity-75" aria-label="Home page" href="/qwen-code-docs/"><span class="ms-2 select-none font-extrabold flex items-center" title="Qwen Code: AI Coding Agent"><img src="https://assets.alicdn.com/g/qwenweb/qwen-webui-fe/0.0.191/static/favicon.png" alt="Qwen Code" width="32" height="32" class="inline-block align-middle mr-2 " style="vertical-align:middle"/><span class="text-[1.3rem] font-normal align-middle mr-1 max-md:hidden">Qwen</span><span class="text-[1.3rem] font-normal align-middle max-md:hidden">Code</span></span></a><div class="x:flex x:gap-4 x:overflow-x-auto nextra-scrollbar x:py-1.5 x:max-md:hidden"></div><div class="x:max-md:hidden"><div class="nextra-search x:relative x:flex x:items-center x:text-gray-900 x:dark:text-gray-300 x:contrast-more:text-gray-800 x:contrast-more:dark:text-gray-300"><input spellCheck="false" autoComplete="off" class="x:rounded-lg x:px-3 x:py-2 x:transition-all x:w-full x:md:w-64 x:text-base x:leading-tight x:md:text-sm x:bg-black/[.05] x:dark:bg-gray-50/10 x:placeholder:text-gray-600 x:dark:placeholder:text-gray-400 x:contrast-more:border x:contrast-more:border-current x:[&::-webkit-search-cancel-button]:appearance-none" placeholder="Search documentation…" id="headlessui-combobox-input-:Rbdaf9ukq:" role="combobox" type="search" aria-expanded="false" aria-autocomplete="list" data-headlessui-state="" value=""/><kbd class="x:absolute x:my-1.5 x:select-none x:pointer-events-none x:end-1.5 x:transition-all x:h-5 x:rounded x:bg-nextra-bg x:px-1.5 x:font-mono x:text-[11px] x:font-medium x:text-gray-600 x:dark:text-gray-400 x:border nextra-border x:contrast-more:text-current x:items-center x:gap-1 x:flex x:max-sm:hidden not-prose x:invisible x:opacity-0">CTRL K</kbd></div></div><a href="https://github.com/QwenLM/qwen-code" target="_blank" rel="noreferrer" class="x:focus-visible:nextra-focus"><svg fill="currentColor" viewBox="3 3 18 18" height="24" aria-label="Project repository"><path d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path></svg></a><div class="flex items-center gap-2 px-3 py-1.5 text-sm text-gray-600 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 rounded-md"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-globe w-4 h-4" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"></path><path d="M2 12h20"></path></svg><span>中文</span></div><button class="x:transition x:cursor-pointer nextra-hamburger x:md:hidden" aria-label="Menu" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" stroke-linecap="round" height="24" class=""><g><path d="M4 6h16"></path></g><path d="M4 12h16"></path><g><path d="M4 18h16"></path></g></svg></button></nav></header><aside class="nextra-mobile-nav x:flex x:flex-col x:fixed x:inset-0 x:pt-(--nextra-navbar-height) x:z-20 x:overscroll-contain x:[contain:layout_style] x:md:hidden x:[.nextra-banner:not([class$=hidden])~&]:pt-[calc(var(--nextra-banner-height)+var(--nextra-navbar-height))] x:bg-nextra-bg x:[transform:translate3d(0,-100%,0)]"><div class="x:px-4 x:pt-4"><div class="nextra-search x:relative x:flex x:items-center x:text-gray-900 x:dark:text-gray-300 x:contrast-more:text-gray-800 x:contrast-more:dark:text-gray-300"><input spellCheck="false" autoComplete="off" class="x:rounded-lg x:px-3 x:py-2 x:transition-all x:w-full x:md:w-64 x:text-base x:leading-tight x:md:text-sm x:bg-black/[.05] x:dark:bg-gray-50/10 x:placeholder:text-gray-600 x:dark:placeholder:text-gray-400 x:contrast-more:border x:contrast-more:border-current x:[&::-webkit-search-cancel-button]:appearance-none" placeholder="Search documentation…" id="headlessui-combobox-input-:R1dln9ukq:" role="combobox" type="search" aria-expanded="false" aria-autocomplete="list" data-headlessui-state="" value=""/><kbd class="x:absolute x:my-1.5 x:select-none x:pointer-events-none x:end-1.5 x:transition-all x:h-5 x:rounded x:bg-nextra-bg x:px-1.5 x:font-mono x:text-[11px] x:font-medium x:text-gray-600 x:dark:text-gray-400 x:border nextra-border x:contrast-more:text-current x:items-center x:gap-1 x:flex x:max-sm:hidden not-prose x:invisible x:opacity-0">CTRL K</kbd></div></div><ul class="x:grid x:gap-1 x:p-4 x:overflow-y-auto nextra-scrollbar nextra-mask"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/">欢迎阅读 Qwen Code 文档</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/deployment/">执行与部署</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/architecture/">架构概述</a></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/cli" type="button" data-headlessui-state="">CLI 使用指南<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[""] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/">CLI 概述</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/commands/">命令参考</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/configuration/">配置指南</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/authentication/">认证设置</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/openai-auth/">OpenAI 认证</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/token-caching/">Token 缓存</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/themes/">主题配置</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/tutorials/">使用教程</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/welcome-back/">欢迎回来功能</a></li></ul></div></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/core" type="button" data-headlessui-state="">核心详情<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[""] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/core/">核心概述</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/core/tools-api/">工具 API</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/core/memport/">内存导入处理器</a></li></ul></div></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/tools" type="button" data-headlessui-state="">工具集合<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[""] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/">工具概述</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/file-system/">文件系统工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/multi-file/">多文件读取工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/shell/">Shell 工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/web-fetch/">Web 获取工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/web-search/">Web 搜索工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/memory/">内存工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/todo-write/">Todo 写入工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/mcp-server/">MCP 服务器</a></li></ul></div></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/checkpointing/">检查点功能</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/extension/">扩展开发</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/ide-integration/">IDE 集成</a></li><li class="active"><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:bg-primary-100 x:font-semibold x:text-primary-800 x:dark:bg-primary-400/10 x:dark:text-primary-600 x:contrast-more:border-primary-500!" href="/qwen-code-docs/zh/telemetry/">可观测性</a></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/examples" type="button" data-headlessui-state="">示例代码<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[""] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/examples/proxy-script/">代理脚本示例</a></li></ul></div></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/npm/">包管理</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/gemini-ignore/">忽略文件配置</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/integration-tests/">集成测试</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/keyboard-shortcuts/">快捷键参考</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/sandbox/">沙箱机制</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/issue-and-pr-automation/">自动化处理</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/troubleshooting/">故障排除</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tos-privacy/">服务条款与隐私</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/Uninstall/">卸载指南</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/subagents/">Subagents</a></li></ul><div class="nextra-sidebar-footer x:border-t nextra-border x:flex x:items-center x:gap-2 x:py-4 x:mx-4 x:mt-auto"><button title="Change theme" class="x:cursor-pointer x:h-7 x:rounded-md x:px-2 x:text-xs x:font-medium x:transition-colors x:text-gray-600 x:dark:text-gray-400 x:flex x:items-center x:gap-2 x:grow" id="headlessui-listbox-button-:R1mtn9ukq:" type="button" aria-haspopup="listbox" aria-expanded="false" data-headlessui-state=""><svg fill="currentColor" viewBox="2 2 20 20" stroke="currentColor" height="12"><path stroke-linecap="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>Light</button><button title="Change language" class="x:cursor-pointer x:h-7 x:rounded-md x:px-2 x:text-xs x:font-medium x:transition-colors x:text-gray-600 x:dark:text-gray-400 x:flex x:items-center x:gap-2 x:grow x:justify-end" id="headlessui-listbox-button-:R1ndn9ukq:" type="button" aria-haspopup="listbox" aria-expanded="false" data-headlessui-state=""><svg viewBox="2 2 16 16" fill="currentColor" height="12"><path fill-rule="evenodd" d="M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z"></path></svg>中文</button></div></aside><div class="x:mx-auto x:flex x:max-w-(--nextra-content-width)"><aside id=":Rpuun9ukq:" class="nextra-sidebar x:print:hidden x:transition-all x:ease-in-out x:max-md:hidden x:flex x:flex-col x:h-[calc(100dvh-var(--nextra-navbar-height))] x:top-(--nextra-navbar-height) x:shrink-0 x:w-64 x:sticky"><div class="x:p-4 x:overflow-y-auto nextra-scrollbar nextra-mask x:grow"><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-100" style="transition-duration:500ms"><ul class="x:grid x:gap-1"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/">欢迎阅读 Qwen Code 文档</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/deployment/">执行与部署</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/architecture/">架构概述</a></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/cli" type="button" data-headlessui-state="">CLI 使用指南<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[""] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/">CLI 概述</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/commands/">命令参考</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/configuration/">配置指南</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/authentication/">认证设置</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/openai-auth/">OpenAI 认证</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/token-caching/">Token 缓存</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/themes/">主题配置</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/tutorials/">使用教程</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/cli/welcome-back/">欢迎回来功能</a></li></ul></div></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/core" type="button" data-headlessui-state="">核心详情<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[""] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/core/">核心概述</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/core/tools-api/">工具 API</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/core/memport/">内存导入处理器</a></li></ul></div></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/tools" type="button" data-headlessui-state="">工具集合<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[""] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/">工具概述</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/file-system/">文件系统工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/multi-file/">多文件读取工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/shell/">Shell 工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/web-fetch/">Web 获取工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/web-search/">Web 搜索工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/memory/">内存工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/todo-write/">Todo 写入工具</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tools/mcp-server/">MCP 服务器</a></li></ul></div></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/checkpointing/">检查点功能</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/extension/">扩展开发</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/ide-integration/">IDE 集成</a></li><li class="active"><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:bg-primary-100 x:font-semibold x:text-primary-800 x:dark:bg-primary-400/10 x:dark:text-primary-600 x:contrast-more:border-primary-500!" href="/qwen-code-docs/zh/telemetry/">可观测性</a></li><li class=""><button class="x:transition x:cursor-pointer x:items-center x:justify-between x:gap-2 x:text-start x:w-full x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" data-href="/zh/examples" type="button" data-headlessui-state="">示例代码<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="18" class="x:shrink-0 x:rounded-sm x:p-0.5 x:hover:bg-gray-800/5 x:dark:hover:bg-gray-100/5 x:motion-reduce:transition-none x:origin-center x:transition-all x:rtl:-rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div class="x:transform-gpu x:transition-all x:ease-in-out x:motion-reduce:transition-none x:opacity-0 x:overflow-hidden" style="height:0;transition-duration:300ms"><ul class="x:grid x:gap-1 x:relative x:before:absolute x:before:inset-y-1 x:before:w-px x:before:bg-gray-200 x:before:content-[""] x:dark:before:bg-neutral-800 x:ps-3 x:before:start-0 x:pt-1 x:ms-3"><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/examples/proxy-script/">代理脚本示例</a></li></ul></div></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/npm/">包管理</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/gemini-ignore/">忽略文件配置</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/integration-tests/">集成测试</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/keyboard-shortcuts/">快捷键参考</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/sandbox/">沙箱机制</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/issue-and-pr-automation/">自动化处理</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/troubleshooting/">故障排除</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/tos-privacy/">服务条款与隐私</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/Uninstall/">卸载指南</a></li><li class=""><a class="x:focus-visible:nextra-focus x:flex x:rounded x:px-2 x:py-1.5 x:text-sm x:transition-colors x:[word-break:break-word] x:cursor-pointer x:contrast-more:border x:text-gray-600 x:hover:bg-gray-100 x:hover:text-gray-900 x:dark:text-neutral-400 x:dark:hover:bg-primary-100/5 x:dark:hover:text-gray-50 x:contrast-more:text-gray-900 x:contrast-more:dark:text-gray-50 x:contrast-more:border-transparent x:contrast-more:hover:border-gray-900 x:contrast-more:dark:hover:border-gray-50" href="/qwen-code-docs/zh/subagents/">Subagents</a></li></ul></div></div><div class="x:sticky x:bottom-0 x:bg-nextra-bg nextra-sidebar-footer x:border-t nextra-border x:flex x:items-center x:gap-2 x:py-4 x:mx-4"><button title="Change language" class="x:cursor-pointer x:h-7 x:rounded-md x:px-2 x:text-xs x:font-medium x:transition-colors x:text-gray-600 x:dark:text-gray-400 x:flex x:items-center x:gap-2 x:grow" id="headlessui-listbox-button-:R6rapuun9ukq:" type="button" aria-haspopup="listbox" aria-expanded="false" data-headlessui-state=""><svg viewBox="2 2 16 16" fill="currentColor" height="12"><path fill-rule="evenodd" d="M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z"></path></svg>中文</button><button title="Change theme" class="x:cursor-pointer x:h-7 x:rounded-md x:px-2 x:text-xs x:font-medium x:transition-colors x:text-gray-600 x:dark:text-gray-400 x:flex x:items-center x:gap-2" id="headlessui-listbox-button-:R6tapuun9ukq:" type="button" aria-haspopup="listbox" aria-expanded="false" data-headlessui-state=""><svg fill="currentColor" viewBox="2 2 20 20" stroke="currentColor" height="12"><path stroke-linecap="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path></svg></button><button class="x:transition x:cursor-pointer x:rounded-md x:p-2 x:text-gray-600 x:dark:text-gray-400" aria-expanded="true" aria-controls=":Rpuun9ukq:" title="Collapse sidebar" type="button" data-headlessui-state=""><svg viewBox="0 0 16 16" fill="currentColor" height="12" class=""><path d="M4.177 7.823l2.396-2.396A.25.25 0 017 5.604v4.792a.25.25 0 01-.427.177L4.177 8.177a.25.25 0 010-.354z"></path><path fill-rule="evenodd" d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0114.25 16H1.75A1.75 1.75 0 010 14.25V1.75zm1.75-.25a.25.25 0 00-.25.25v12.5c0 .138.112.25.25.25H9.5v-13H1.75zm12.5 13H11v-13h3.25a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25z"></path></svg></button></div></aside><nav class="nextra-toc x:order-last x:max-xl:hidden x:w-64 x:shrink-0 x:print:hidden" aria-label="table of contents"><div class="x:grid x:grid-rows-[min-content_1fr_min-content] x:sticky x:top-(--nextra-navbar-height) x:text-sm x:max-h-[calc(100vh-var(--nextra-navbar-height))]"><p class="x:pt-6 x:px-4 x:font-semibold x:tracking-tight">On This Page</p><ul class="x:p-4 nextra-scrollbar x:overscroll-y-contain x:overflow-y-auto x:hyphens-auto nextra-mask"><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#启用遥测" class="x:focus-visible:nextra-focus x:font-semibold x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">启用遥测</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#优先级顺序" class="x:focus-visible:nextra-focus x:ms-3 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">优先级顺序</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#示例配置" class="x:focus-visible:nextra-focus x:ms-3 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">示例配置</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#导出到文件" class="x:focus-visible:nextra-focus x:ms-3 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">导出到文件</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#运行-otel-collector" class="x:focus-visible:nextra-focus x:font-semibold x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">运行 OTEL Collector</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#本地部署" class="x:focus-visible:nextra-focus x:ms-3 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">本地部署</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#google-cloud" class="x:focus-visible:nextra-focus x:ms-3 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">Google Cloud</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#日志和指标参考" class="x:focus-visible:nextra-focus x:font-semibold x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">日志和指标参考</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#日志" class="x:focus-visible:nextra-focus x:ms-3 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">日志</a></li><li class="x:my-2 x:scroll-my-6 x:scroll-py-6"><a href="#metrics" class="x:focus-visible:nextra-focus x:ms-3 x:block x:transition-colors x:subpixel-antialiased x:text-gray-600 x:hover:text-gray-900 x:dark:text-gray-400 x:dark:hover:text-gray-300 x:contrast-more:text-gray-900 x:contrast-more:underline x:contrast-more:dark:text-gray-50 x:break-words">Metrics</a></li></ul><div class="x:grid x:gap-2 x:py-4 x:mx-4 x:border-t nextra-border"><a href="https://github.com/QwenLM/qwen-code/issues/new?title=Feedback%20for%20%E2%80%9CQwen%20Code%20%E5%8F%AF%E8%A7%82%E6%B5%8B%E6%80%A7%E6%8C%87%E5%8D%97%E2%80%9D&labels=feedback" target="_blank" rel="noreferrer" class="x:focus-visible:nextra-focus x:text-xs x:font-medium x:transition x:text-gray-600 x:dark:text-gray-400 x:hover:text-gray-800 x:dark:hover:text-gray-200 x:contrast-more:text-gray-700 x:contrast-more:dark:text-gray-100">Question? Give us feedback<!-- --> <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.7" viewBox="0 0 24 24" height="1em" class="x:inline x:align-baseline x:shrink-0"><path d="M7 17L17 7"></path><path d="M7 7h10v10"></path></svg></a><a href="https://github.com/QwenLM/qwen-code/blob/main/docs/content/zh/telemetry.md" target="_blank" rel="noreferrer" class="x:focus-visible:nextra-focus x:text-xs x:font-medium x:transition x:text-gray-600 x:dark:text-gray-400 x:hover:text-gray-800 x:dark:hover:text-gray-200 x:contrast-more:text-gray-700 x:contrast-more:dark:text-gray-100">Edit this page<!-- --> <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.7" viewBox="0 0 24 24" height="1em" class="x:inline x:align-baseline x:shrink-0"><path d="M7 17L17 7"></path><path d="M7 7h10v10"></path></svg></a><button class="x:transition x:cursor-pointer x:flex x:items-center x:gap-1.5 x:whitespace-nowrap x:opacity-0 x:text-xs x:font-medium x:transition x:text-gray-600 x:dark:text-gray-400 x:hover:text-gray-800 x:dark:hover:text-gray-200 x:contrast-more:text-gray-700 x:contrast-more:dark:text-gray-100" aria-hidden="true" type="button" disabled="" data-headlessui-state="disabled" data-disabled="">Scroll to top<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="1.1em" class="x:-rotate-90 x:border x:rounded-full x:border-current"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></button></div></div></nav><article class="x:w-full x:min-w-0 x:break-words x:min-h-[calc(100vh-var(--nextra-navbar-height))] x:text-slate-700 x:dark:text-slate-200 x:pb-8 x:px-4 x:pt-4 x:md:px-12"><div class="nextra-breadcrumb x:mt-1.5 x:flex x:items-center x:gap-1 x:overflow-hidden x:text-sm x:text-gray-600 x:dark:text-gray-400 x:contrast-more:text-current"><span class="x:whitespace-nowrap x:transition-colors x:font-medium x:text-black x:dark:text-gray-100" title="可观测性">可观测性</span></div><div id="nextra-skip-nav"></div><main data-pagefind-body="true"><h1 class="x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-bold x:mt-2 x:text-4xl">Qwen Code 可观测性指南</h1>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">遥测(Telemetry)提供有关 Qwen Code 性能、健康状况和使用情况的数据。通过启用遥测功能,你可以通过 traces、metrics 和结构化日志来监控运行状态、调试问题并优化工具使用。</p>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">Qwen Code 的遥测系统基于 <strong><a href="https://opentelemetry.io/" target="_blank" rel="noreferrer" class="x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]">OpenTelemetry<!-- --> <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.7" viewBox="0 0 24 24" height="1em" class="x:inline x:align-baseline x:shrink-0"><path d="M7 17L17 7"></path><path d="M7 7h10v10"></path></svg></a> (OTEL)</strong> 标准构建,允许你将数据发送到任何兼容的后端。</p>
|
||
<h2 id="启用遥测" class="x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border">启用遥测<a href="#启用遥测" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h2>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">你可以通过多种方式启用遥测功能。配置主要通过 <a class="x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]" href="./cli/configuration"><code class="nextra-code" dir="ltr">.qwen/settings.json</code> 文件</a> 和环境变量进行管理,但 CLI flags 可以在特定会话中覆盖这些设置。</p>
|
||
<h3 id="优先级顺序" class="x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl">优先级顺序<a href="#优先级顺序" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">以下列出了应用遥测设置的优先级顺序,列表中越靠上的项优先级越高:</p>
|
||
<ol class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-decimal x:ms-6">
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>CLI flags(针对 <code class="nextra-code" dir="ltr">qwen</code> 命令):</strong></p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">--telemetry</code> / <code class="nextra-code" dir="ltr">--no-telemetry</code>:覆盖 <code class="nextra-code" dir="ltr">telemetry.enabled</code>。</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">--telemetry-target <local|gcp></code>:覆盖 <code class="nextra-code" dir="ltr">telemetry.target</code>。</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">--telemetry-otlp-endpoint <URL></code>:覆盖 <code class="nextra-code" dir="ltr">telemetry.otlpEndpoint</code>。</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">--telemetry-log-prompts</code> / <code class="nextra-code" dir="ltr">--no-telemetry-log-prompts</code>:覆盖 <code class="nextra-code" dir="ltr">telemetry.logPrompts</code>。</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">--telemetry-outfile <path></code>:将遥测输出重定向到文件。详见 <a href="#exporting-to-a-file" class="x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]">导出到文件</a>。</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>环境变量:</strong></p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">OTEL_EXPORTER_OTLP_ENDPOINT</code>:覆盖 <code class="nextra-code" dir="ltr">telemetry.otlpEndpoint</code>。</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>工作区设置文件(<code class="nextra-code" dir="ltr">.qwen/settings.json</code>):</strong> 该 project-specific 文件中 <code class="nextra-code" dir="ltr">telemetry</code> 对象的值。</p>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>用户设置文件(<code class="nextra-code" dir="ltr">~/.qwen/settings.json</code>):</strong> 该 global user 文件中 <code class="nextra-code" dir="ltr">telemetry</code> 对象的值。</p>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>默认值:</strong> 如果以上均未设置,则应用以下默认值。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">telemetry.enabled</code>: <code class="nextra-code" dir="ltr">false</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">telemetry.target</code>: <code class="nextra-code" dir="ltr">local</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">telemetry.otlpEndpoint</code>: <code class="nextra-code" dir="ltr">http://localhost:4317</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">telemetry.logPrompts</code>: <code class="nextra-code" dir="ltr">true</code></li>
|
||
</ul>
|
||
</li>
|
||
</ol>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>对于 <code class="nextra-code" dir="ltr">npm run telemetry -- --target=<gcp|local></code> 脚本:</strong>
|
||
该脚本的 <code class="nextra-code" dir="ltr">--target</code> 参数<strong>仅</strong>在该脚本执行期间和目的范围内覆盖 <code class="nextra-code" dir="ltr">telemetry.target</code>(即选择启动哪个 collector)。它不会永久更改你的 <code class="nextra-code" dir="ltr">settings.json</code>。脚本会首先查看 <code class="nextra-code" dir="ltr">settings.json</code> 中的 <code class="nextra-code" dir="ltr">telemetry.target</code> 作为默认值。</p>
|
||
<h3 id="示例配置" class="x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl">示例配置<a href="#示例配置" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">你可以将以下代码添加到你的工作区配置文件 (<code class="nextra-code" dir="ltr">.qwen/settings.json</code>) 或用户配置文件 (<code class="nextra-code" dir="ltr">~/.qwen/settings.json</code>) 中,以启用遥测功能并将数据发送到 Google Cloud:</p>
|
||
<div data-pagefind-ignore="all" class="nextra-code x:relative x:not-first:mt-[1.25em]"><pre class="x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose" tabindex="0"><div class="x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2"><button class="x:transition x:cursor-pointer x:border x:border-gray-300 x:dark:border-neutral-700 x:contrast-more:border-gray-900 x:contrast-more:dark:border-gray-50 x:rounded-md x:p-1.5 x:md:hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="1em"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">{</span></span>
|
||
<span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> "telemetry"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: {</span></span>
|
||
<span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> "enabled"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">,</span></span>
|
||
<span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> "target"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">"gcp"</span></span>
|
||
<span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> },</span></span>
|
||
<span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> "sandbox"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF">false</span></span>
|
||
<span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">}</span></span></code></pre></div>
|
||
<h3 id="导出到文件" class="x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl">导出到文件<a href="#导出到文件" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">你可以将所有遥测数据导出到一个文件中,方便在本地查看。</p>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">要启用文件导出功能,请使用 <code class="nextra-code" dir="ltr">--telemetry-outfile</code> 参数,并指定你希望输出的文件路径。此功能必须配合 <code class="nextra-code" dir="ltr">--telemetry-target=local</code> 一起使用。</p>
|
||
<div data-pagefind-ignore="all" class="nextra-code x:relative x:not-first:mt-[1.25em]"><pre class="x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose" tabindex="0"><div class="x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2"><button class="x:transition x:cursor-pointer x:border x:border-gray-300 x:dark:border-neutral-700 x:contrast-more:border-gray-900 x:contrast-more:dark:border-gray-50 x:rounded-md x:p-1.5 x:md:hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="1em"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div><code class="nextra-code" dir="ltr"><span> </span>
|
||
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"># 设置你希望输出的文件路径</span></span>
|
||
<span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">TELEMETRY_FILE</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">".qwen/telemetry.log"</span></span>
|
||
<span> </span>
|
||
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"># 使用本地遥测功能运行 Qwen Code</span></span>
|
||
<span> </span>
|
||
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"># 注意:必须设置 --telemetry-otlp-endpoint="" 来覆盖默认的</span></span>
|
||
<span> </span>
|
||
<span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D"># OTLP 导出器,确保遥测数据写入本地文件。</span></span>
|
||
<span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0">qwen</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> --telemetry</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> \</span></span>
|
||
<span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> --telemetry-target=local</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> \</span></span>
|
||
<span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> --telemetry-otlp-endpoint=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">""</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> \</span></span>
|
||
<span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> --telemetry-outfile=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8">$TELEMETRY_FILE</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> \</span></span>
|
||
<span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> --prompt</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> "What is OpenTelemetry?"</span></span></code></pre></div>
|
||
<h2 id="运行-otel-collector" class="x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border">运行 OTEL Collector<a href="#运行-otel-collector" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h2>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">OTEL Collector 是一个接收、处理和导出遥测数据的服务。
|
||
CLI 可以使用 OTLP/gRPC 或 OTLP/HTTP 协议发送数据。
|
||
你可以通过 <code class="nextra-code" dir="ltr">--telemetry-otlp-protocol</code> flag
|
||
或 <code class="nextra-code" dir="ltr">settings.json</code> 文件中的 <code class="nextra-code" dir="ltr">telemetry.otlpProtocol</code> 设置来指定使用哪种协议。更多
|
||
详情请参见 <a class="x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]" href="./cli/configuration#--telemetry-otlp-protocol">配置文档</a>。</p>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">在 <a href="https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/" target="_blank" rel="noreferrer" class="x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]">documentation<!-- --> <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.7" viewBox="0 0 24 24" height="1em" class="x:inline x:align-baseline x:shrink-0"><path d="M7 17L17 7"></path><path d="M7 7h10v10"></path></svg></a> 中了解更多关于 OTEL exporter 标准配置的信息。</p>
|
||
<h3 id="本地部署" class="x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl">本地部署<a href="#本地部署" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">使用 <code class="nextra-code" dir="ltr">npm run telemetry -- --target=local</code> 命令可以自动化设置本地 telemetry pipeline,包括在你的 <code class="nextra-code" dir="ltr">.qwen/settings.json</code> 文件中配置必要的设置。底层脚本会安装 <code class="nextra-code" dir="ltr">otelcol-contrib</code>(OpenTelemetry Collector)和 <code class="nextra-code" dir="ltr">jaeger</code>(用于查看 traces 的 Jaeger UI)。使用方式如下:</p>
|
||
<ol class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-decimal x:ms-6">
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>运行命令</strong>:
|
||
在 repository 根目录下执行以下命令:</p>
|
||
<div data-pagefind-ignore="all" class="nextra-code x:relative x:not-first:mt-[1.25em]"><pre class="x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose" tabindex="0"><div class="x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2"><button class="x:transition x:cursor-pointer x:border x:border-gray-300 x:dark:border-neutral-700 x:contrast-more:border-gray-900 x:contrast-more:dark:border-gray-50 x:rounded-md x:p-1.5 x:md:hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="1em"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0">npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> telemetry</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> --</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> --target=local</span></span></code></pre></div>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">脚本将会:</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]">如有需要,下载 Jaeger 和 OTEL。</li>
|
||
<li class="x:my-[.5em]">启动一个本地 Jaeger 实例。</li>
|
||
<li class="x:my-[.5em]">启动一个配置好的 OTEL collector,用于接收来自 Qwen Code 的数据。</li>
|
||
<li class="x:my-[.5em]">自动在你的 workspace settings 中启用 telemetry。</li>
|
||
<li class="x:my-[.5em]">退出时,自动禁用 telemetry。</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>查看 traces</strong>:
|
||
打开浏览器并访问 <strong><a href="http://localhost:16686" target="_blank" rel="noreferrer" class="x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]">http://localhost:16686<!-- --> <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.7" viewBox="0 0 24 24" height="1em" class="x:inline x:align-baseline x:shrink-0"><path d="M7 17L17 7"></path><path d="M7 7h10v10"></path></svg></a></strong> 进入 Jaeger UI,在这里你可以查看 Qwen Code 操作的详细 traces。</p>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>查看 logs 和 metrics</strong>:
|
||
脚本会将 OTEL collector 的输出(包括 logs 和 metrics)重定向到 <code class="nextra-code" dir="ltr">~/.qwen/tmp/<projectHash>/otel/collector.log</code>。脚本还会提供链接和命令,方便你本地查看 telemetry 数据(traces、metrics、logs)。</p>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>停止服务</strong>:
|
||
在脚本运行的终端中按下 <code class="nextra-code" dir="ltr">Ctrl+C</code>,即可停止 OTEL Collector 和 Jaeger 服务。</p>
|
||
</li>
|
||
</ol>
|
||
<h3 id="google-cloud" class="x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl">Google Cloud<a href="#google-cloud" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">使用 <code class="nextra-code" dir="ltr">npm run telemetry -- --target=gcp</code> 命令可以自动化设置一个本地 OpenTelemetry collector,将数据转发到你的 Google Cloud 项目,并自动配置 <code class="nextra-code" dir="ltr">.qwen/settings.json</code> 文件中的必要设置。该脚本底层会安装 <code class="nextra-code" dir="ltr">otelcol-contrib</code>。使用步骤如下:</p>
|
||
<ol class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-decimal x:ms-6">
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>前置条件</strong>:</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]">拥有一个 Google Cloud 项目 ID。</li>
|
||
<li class="x:my-[.5em]">导出 <code class="nextra-code" dir="ltr">GOOGLE_CLOUD_PROJECT</code> 环境变量,以便 OTEL collector 可以读取。
|
||
<div data-pagefind-ignore="all" class="nextra-code x:relative x:not-first:mt-[1.25em]"><pre class="x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose" tabindex="0"><div class="x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2"><button class="x:transition x:cursor-pointer x:border x:border-gray-300 x:dark:border-neutral-700 x:contrast-more:border-gray-900 x:contrast-more:dark:border-gray-50 x:rounded-md x:p-1.5 x:md:hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="1em"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8"> OTLP_GOOGLE_CLOUD_PROJECT</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF">"your-project-id"</span></span></code></pre></div>
|
||
</li>
|
||
<li class="x:my-[.5em]">完成 Google Cloud 身份验证(例如运行 <code class="nextra-code" dir="ltr">gcloud auth application-default login</code>,或确保已设置 <code class="nextra-code" dir="ltr">GOOGLE_APPLICATION_CREDENTIALS</code>)。</li>
|
||
<li class="x:my-[.5em]">确保你的 Google Cloud 账户或服务账户拥有以下 IAM 角色:“Cloud Trace Agent”、“Monitoring Metric Writer” 和 “Logs Writer”。</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>运行命令</strong>:
|
||
在项目根目录下执行以下命令:</p>
|
||
<div data-pagefind-ignore="all" class="nextra-code x:relative x:not-first:mt-[1.25em]"><pre class="x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose" tabindex="0"><div class="x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2"><button class="x:transition x:cursor-pointer x:border x:border-gray-300 x:dark:border-neutral-700 x:contrast-more:border-gray-900 x:contrast-more:dark:border-gray-50 x:rounded-md x:p-1.5 x:md:hidden" title="Toggle word wrap" type="button" data-headlessui-state=""><svg viewBox="0 0 24 24" fill="currentColor" height="1em"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"></path></svg></button></div><code class="nextra-code" dir="ltr"><span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0">npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF"> telemetry</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> --</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF"> --target=gcp</span></span></code></pre></div>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">脚本将会:</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]">如果需要,下载 <code class="nextra-code" dir="ltr">otelcol-contrib</code> 二进制文件。</li>
|
||
<li class="x:my-[.5em]">启动一个 OTEL collector,配置为接收来自 Qwen Code 的数据并导出到你指定的 Google Cloud 项目。</li>
|
||
<li class="x:my-[.5em]">自动在你的工作区设置(<code class="nextra-code" dir="ltr">.qwen/settings.json</code>)中启用 telemetry 并关闭 sandbox 模式。</li>
|
||
<li class="x:my-[.5em]">提供直接链接,用于在 Google Cloud Console 中查看 traces、metrics 和 logs。</li>
|
||
<li class="x:my-[.5em]">在退出时(Ctrl+C),尝试恢复你原来的 telemetry 和 sandbox 设置。</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>运行 Qwen Code</strong>:
|
||
在另一个终端中运行你的 Qwen Code 命令。这将生成 telemetry 数据,由 collector 捕获。</p>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>在 Google Cloud 中查看 telemetry 数据</strong>:
|
||
使用脚本提供的链接跳转到 Google Cloud Console,查看你的 traces、metrics 和 logs。</p>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>查看本地 collector 日志</strong>:
|
||
脚本将本地 OTEL collector 的输出重定向到 <code class="nextra-code" dir="ltr">~/.qwen/tmp/<projectHash>/otel/collector-gcp.log</code>。脚本还会提供链接和命令,方便你在本地查看或 tail collector 日志。</p>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><strong>停止服务</strong>:
|
||
在脚本运行的终端中按下 <code class="nextra-code" dir="ltr">Ctrl+C</code>,即可停止 OTEL Collector。</p>
|
||
</li>
|
||
</ol>
|
||
<h2 id="日志和指标参考" class="x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border">日志和指标参考<a href="#日志和指标参考" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h2>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">以下部分描述了为 Qwen Code 生成的日志和指标的结构。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]">所有日志和指标都包含一个通用属性 <code class="nextra-code" dir="ltr">sessionId</code>。</li>
|
||
</ul>
|
||
<h3 id="日志" class="x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl">日志<a href="#日志" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">日志是带有时间戳的特定事件记录。Qwen Code 会记录以下事件:</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.config</code>:该事件在启动时发生一次,记录 CLI 的配置信息。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>属性</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">model</code> (string)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">embedding_model</code> (string)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">sandbox_enabled</code> (boolean)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">core_tools_enabled</code> (string)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">approval_mode</code> (string)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">api_key_enabled</code> (boolean)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">vertex_ai_enabled</code> (boolean)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">code_assist_enabled</code> (boolean)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">log_prompts_enabled</code> (boolean)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">file_filtering_respect_git_ignore</code> (boolean)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">debug_mode</code> (boolean)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">mcp_servers</code> (string)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.user_prompt</code>:该事件在用户提交 prompt 时发生。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>属性</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">prompt_length</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">prompt</code>(如果 <code class="nextra-code" dir="ltr">log_prompts_enabled</code> 配置为 <code class="nextra-code" dir="ltr">false</code>,则该属性会被排除)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">auth_type</code></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.tool_call</code>:该事件在每次函数调用时发生。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>属性</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">function_name</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">function_args</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">duration_ms</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">success</code> (boolean)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">decision</code> (string: “accept”, “reject”, “auto_accept”, 或 “modify”,如适用)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">error</code>(如适用)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">error_type</code>(如适用)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">metadata</code>(如适用,string -> any 的字典)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.api_request</code>:该事件在向 Qwen API 发起请求时发生。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>属性</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">model</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">request_text</code>(如适用)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.api_error</code>:该事件在 API 请求失败时发生。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>属性</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">model</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">error</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">error_type</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">status_code</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">duration_ms</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">auth_type</code></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.api_response</code>:该事件在收到 Qwen API 响应时发生。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>属性</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">model</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">status_code</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">duration_ms</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">error</code>(可选)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">input_token_count</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">output_token_count</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">cached_content_token_count</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">thoughts_token_count</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">tool_token_count</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">response_text</code>(如适用)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">auth_type</code></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.flash_fallback</code>:该事件在 Qwen Code 切换为使用 flash 作为 fallback 时发生。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>属性</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">auth_type</code></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.slash_command</code>:该事件在用户执行斜杠命令时发生。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>属性</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">command</code> (string)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">subcommand</code> (string,如适用)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<h3 id="metrics" class="x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl">Metrics<a href="#metrics" class="x:focus-visible:nextra-focus subheading-anchor" aria-label="Permalink for this section"></a></h3>
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7">Metrics 是对行为随时间变化的数值测量。Qwen Code 收集以下指标(指标名称仍保留为 <code class="nextra-code" dir="ltr">qwen-code.*</code> 以保持兼容性):</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.session.count</code> (Counter, Int):每次 CLI 启动时递增一次。</p>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.tool.call.count</code> (Counter, Int):统计工具调用次数。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>Attributes</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">function_name</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">success</code> (boolean)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">decision</code> (string: “accept”, “reject”, 或 “modify”,如果适用)</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">tool_type</code> (string: “mcp”, 或 “native”,如果适用)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.tool.call.latency</code> (Histogram, ms):测量工具调用延迟。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>Attributes</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">function_name</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">decision</code> (string: “accept”, “reject”, 或 “modify”,如果适用)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.api.request.count</code> (Counter, Int):统计所有 API 请求次数。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>Attributes</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">model</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">status_code</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">error_type</code> (如果适用)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.api.request.latency</code> (Histogram, ms):测量 API 请求延迟。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>Attributes</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">model</code></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.token.usage</code> (Counter, Int):统计使用的 token 数量。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>Attributes</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">model</code></li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">type</code> (string: “input”, “output”, “thought”, “cache”, 或 “tool”)</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.file.operation.count</code> (Counter, Int):统计文件操作次数。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>Attributes</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">operation</code> (string: “create”, “read”, “update”):文件操作类型。</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">lines</code> (Int, 如果适用):文件中的行数。</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">mimetype</code> (string, 如果适用):文件的 MIME 类型。</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">extension</code> (string, 如果适用):文件扩展名。</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">ai_added_lines</code> (Int, 如果适用):AI 添加/修改的行数。</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">ai_removed_lines</code> (Int, 如果适用):AI 删除/修改的行数。</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">user_added_lines</code> (Int, 如果适用):用户在 AI 提议的更改中添加/修改的行数。</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">user_removed_lines</code> (Int, 如果适用):用户在 AI 提议的更改中删除/修改的行数。</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="x:my-[.5em]">
|
||
<p class="x:not-first:mt-[1.25em] x:leading-7"><code class="nextra-code" dir="ltr">qwen-code.chat_compression</code> (Counter, Int):统计聊天压缩操作次数。</p>
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><strong>Attributes</strong>:
|
||
<ul class="x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]">
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">tokens_before</code> (Int):压缩前上下文中的 token 数量。</li>
|
||
<li class="x:my-[.5em]"><code class="nextra-code" dir="ltr">tokens_after</code> (Int):压缩后上下文中的 token 数量。</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul></main><div class="x:mt-12 x:mb-8 x:text-xs x:text-gray-600 x:text-end x:dark:text-gray-400">Last updated on<!-- --> <time dateTime="2026-09-17T17:32:34.000Z">2026年9月17日</time></div><div class="x:mb-8 x:flex x:items-center x:border-t x:pt-8 nextra-border x:print:hidden"><a title="IDE 集成" class="x:focus-visible:nextra-focus x:text-gray-600 x:dark:text-gray-400 x:hover:text-gray-800 x:dark:hover:text-gray-200 x:contrast-more:text-gray-700 x:contrast-more:dark:text-gray-100 x:flex x:max-w-[50%] x:items-center x:gap-1 x:py-4 x:text-base x:font-medium x:transition-colors x:[word-break:break-word] x:md:text-lg x:pe-4" href="/qwen-code-docs/zh/ide-integration/"><svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="20" class="x:inline x:shrink-0 x:ltr:rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg>IDE 集成</a><a title="代理脚本示例" class="x:focus-visible:nextra-focus x:text-gray-600 x:dark:text-gray-400 x:hover:text-gray-800 x:dark:hover:text-gray-200 x:contrast-more:text-gray-700 x:contrast-more:dark:text-gray-100 x:flex x:max-w-[50%] x:items-center x:gap-1 x:py-4 x:text-base x:font-medium x:transition-colors x:[word-break:break-word] x:md:text-lg x:ps-4 x:ms-auto x:text-end" href="/qwen-code-docs/zh/examples/proxy-script/">代理脚本示例<svg viewBox="0 0 24 24" stroke="currentColor" fill="none" stroke-width="2" height="20" class="x:inline x:shrink-0 x:rtl:rotate-180"><path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round"></path></svg></a></div></article></div><script src="/qwen-code-docs/_next/static/chunks/webpack-6175f18c4ffcc31c.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/qwen-code-docs/_next/static/css/7fba7395046b8eaa.css\",\"style\"]\n2:HL[\"/qwen-code-docs/_next/static/css/04d76539cc2c4ebd.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"3:I[12846,[],\"\"]\n6:I[4707,[],\"\"]\n9:I[36423,[],\"\"]\nb:I[78400,[\"3185\",\"static/chunks/app/layout-38b548b4f4d27f80.js\"],\"FontLoader\"]\nd:I[61060,[],\"\"]\n7:[\"lang\",\"zh\",\"d\"]\n8:[\"mdxPath\",\"telemetry\",\"oc\"]\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L3\",null,{\"buildId\":\"0y8u-WGJo2VFWAF7bkrdx\",\"assetPrefix\":\"/qwen-code-docs\",\"urlParts\":[\"\",\"zh\",\"telemetry\",\"\"],\"initialTree\":[\"\",{\"children\":[[\"lang\",\"zh\",\"d\"],{\"children\":[[\"mdxPath\",\"telemetry\",\"oc\"],{\"children\":[\"__PAGE__?{\\\"lang\\\":\\\"zh\\\",\\\"mdxPath\\\":[\\\"telemetry\\\"]}\",{}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[[\"lang\",\"zh\",\"d\"],{\"children\":[[\"mdxPath\",\"telemetry\",\"oc\"],{\"children\":[\"__PAGE__\",{},[[\"$L4\",\"$L5\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/qwen-code-docs/_next/static/css/04d76539cc2c4ebd.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]]],null],null]},[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$7\",\"children\",\"$8\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[null,\"$La\"],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/qwen-code-docs/_next/static/css/7fba7395046b8eaa.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$undefined\",[\"$\",\"style\",null,{\"children\":\":root {\\n --nextra-primary-hue: 248deg;\\n --nextra-primary-saturation: 74%;\\n --nextra-primary-lightness: 45%;\\n --nextra-bg: 250,250,250;\\n --nextra-content-width: 90rem;\\n}\\n.dark {\\n --nextra-primary-hue: 248deg;\\n --nextra-primary-saturation: 74%;\\n --nextra-primary-lightness: 55%;\\n --nextra-bg: 17,17,17;\\n}\\n::selection {\\n background: hsla(var(--nextra-primary-hue),var(--nextra-primary-saturation),var(--nextra-primary-lightness),.3);\\n}\\nhtml {\\n background: rgb(var(--nextra-bg));\\n}\"}],[\"$\",\"meta\",null,{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: light)\",\"content\":\"rgb(250,250,250)\"}],[\"$\",\"meta\",null,{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: dark)\",\"content\":\"rgb(17,17,17)\"}],\"$undefined\"]}],[\"$\",\"body\",null,{\"children\":[[\"$\",\"$Lb\",null,{}],[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]\n"])</script><script>self.__next_f.push([1,"f:I[54108,[\"5501\",\"static/chunks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"ThemeConfigProvider\"]\n10:I[16016,[\"5501\",\"static/chunks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"LastUpdated\"]\n11:I[30763,[\"5501\",\"static/chunks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"Search\"]\n12:I[25922,[\"5501\",\"static/chunks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"ThemeProvider\"]\n13:I[94328,[\"5501\",\"static/chunks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"SkipNavLink\"]\n14:I[17691,[\"5501\",\"static/chunks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"ConfigProvider\"]\n15:I[72972,[\"5501\",\"static/chunks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"\"]\n16:I[88212,[\"5501\",\"static/ch"])</script><script>self.__next_f.push([1,"unks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"ClientNavbar\"]\n18:I[32594,[\"5501\",\"static/chunks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"LanguageDropdown\"]\n19:I[57191,[\"5501\",\"static/chunks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"MobileNav\"]\n1a:I[18960,[\"5501\",\"static/chunks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"TOCProvider\"]\n1b:I[57191,[\"5501\",\"static/chunks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"Sidebar\"]\n1c:I[98270,[\"5501\",\"static/chunks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"ClientWrapper\"]\n1d:I[56099,[\"5501\",\"static/chunks/c16f53c3-b998f97655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"HeadingAnchor\"]\n1e:I[98451,[\"5501\",\"static/chunks/c16f53c3-b998f97"])</script><script>self.__next_f.push([1,"655e65347.js\",\"1105\",\"static/chunks/1105-e07e82095c5c7b4a.js\",\"5524\",\"static/chunks/5524-d228bcaedae4ecb3.js\",\"2770\",\"static/chunks/2770-e894e62890be5e00.js\",\"1084\",\"static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js\"],\"ToggleWordWrapButton\"]\n17:T481,M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"])</script><script>self.__next_f.push([1,"a:[\"$\",\"$Lf\",null,{\"value\":{\"children\":\"$undefined\",\"darkMode\":true,\"docsRepositoryBase\":\"https://github.com/QwenLM/qwen-code/blob/main/docs\",\"editLink\":\"Edit this page\",\"feedback\":{\"content\":\"Question? Give us feedback\",\"labels\":\"feedback\"},\"i18n\":[{\"locale\":\"en\",\"name\":\"English\"},{\"locale\":\"zh\",\"name\":\"中文\"},{\"locale\":\"de\",\"name\":\"Deutsch\"},{\"locale\":\"fr\",\"name\":\"Français\"},{\"locale\":\"ru\",\"name\":\"Русский\"},{\"locale\":\"ja\",\"name\":\"日本語\"}],\"lastUpdated\":[\"$\",\"$L10\",null,{}],\"navigation\":{\"next\":true,\"prev\":true},\"search\":[\"$\",\"$L11\",null,{}],\"sidebar\":{\"defaultMenuCollapseLevel\":1,\"defaultOpen\":true,\"toggleButton\":true,\"autoCollapse\":true},\"themeSwitch\":{\"dark\":\"Dark\",\"light\":\"Light\",\"system\":\"System\"},\"toc\":{\"backToTop\":\"Scroll to top\",\"float\":true,\"title\":\"On This Page\"}},\"children\":[\"$\",\"$L12\",null,{\"attribute\":\"class\",\"defaultTheme\":\"light\",\"disableTransitionOnChange\":true,\"storageKey\":\"theme\",\"children\":[[\"$\",\"$L13\",null,{}],\"$undefined\",[\"$\",\"$L14\",null,{\"pageMap\":[{\"data\":{\"index\":{\"title\":\"欢迎阅读 Qwen Code 文档\"},\"deployment\":{\"title\":\"执行与部署\"},\"architecture\":{\"title\":\"架构概述\"},\"cli\":{\"title\":\"CLI 使用指南\"},\"core\":{\"title\":\"核心详情\"},\"tools\":{\"title\":\"工具集合\"},\"checkpointing\":{\"title\":\"检查点功能\"},\"extension\":{\"title\":\"扩展开发\"},\"ide-integration\":{\"title\":\"IDE 集成\"},\"telemetry\":{\"title\":\"可观测性\"},\"examples\":{\"title\":\"示例代码\"},\"npm\":{\"title\":\"包管理\"},\"gemini-ignore\":{\"title\":\"忽略文件配置\"},\"integration-tests\":{\"title\":\"集成测试\"},\"keyboard-shortcuts\":{\"title\":\"快捷键参考\"},\"sandbox\":{\"title\":\"沙箱机制\"},\"issue-and-pr-automation\":{\"title\":\"自动化处理\"},\"troubleshooting\":{\"title\":\"故障排除\"},\"tos-privacy\":{\"title\":\"服务条款与隐私\"},\"Uninstall\":{\"title\":\"卸载指南\"}}},{\"name\":\"index\",\"route\":\"/zh\",\"frontMatter\":{\"title\":\"欢迎阅读 Qwen Code 文档\",\"filePath\":\"content/zh/index.md\",\"timestamp\":1789666354000},\"title\":\"欢迎阅读 Qwen Code 文档\"},{\"name\":\"deployment\",\"route\":\"/zh/deployment\",\"frontMatter\":{\"title\":\"Qwen Code 执行与部署\",\"filePath\":\"content/zh/deployment.md\",\"timestamp\":1789666354000},\"title\":\"执行与部署\"},{\"name\":\"architecture\",\"route\":\"/zh/architecture\",\"frontMatter\":{\"title\":\"Qwen Code 架构概述\",\"filePath\":\"content/zh/architecture.md\",\"timestamp\":1789666354000},\"title\":\"架构概述\"},{\"name\":\"cli\",\"route\":\"/zh/cli\",\"children\":[{\"data\":{\"index\":{\"title\":\"CLI 概述\"},\"commands\":{\"title\":\"命令参考\"},\"configuration\":{\"title\":\"配置指南\"},\"authentication\":{\"title\":\"认证设置\"},\"openai-auth\":{\"title\":\"OpenAI 认证\"},\"token-caching\":{\"title\":\"Token 缓存\"},\"themes\":{\"title\":\"主题配置\"},\"tutorials\":{\"title\":\"使用教程\"}}},{\"name\":\"index\",\"route\":\"/zh/cli\",\"frontMatter\":{\"title\":\"Qwen Code CLI\",\"filePath\":\"content/zh/cli/index.md\",\"timestamp\":1789666354000},\"title\":\"CLI 概述\"},{\"name\":\"commands\",\"route\":\"/zh/cli/commands\",\"frontMatter\":{\"title\":\"CLI 命令\",\"filePath\":\"content/zh/cli/commands.md\",\"timestamp\":1789666354000},\"title\":\"命令参考\"},{\"name\":\"configuration\",\"route\":\"/zh/cli/configuration\",\"frontMatter\":{\"title\":\"Qwen Code 配置\",\"filePath\":\"content/zh/cli/configuration.md\",\"timestamp\":1789666354000},\"title\":\"配置指南\"},{\"name\":\"authentication\",\"route\":\"/zh/cli/authentication\",\"frontMatter\":{\"title\":\"认证设置\",\"filePath\":\"content/zh/cli/authentication.md\",\"timestamp\":1789666354000},\"title\":\"认证设置\"},{\"name\":\"openai-auth\",\"route\":\"/zh/cli/openai-auth\",\"frontMatter\":{\"title\":\"OpenAI 认证\",\"filePath\":\"content/zh/cli/openai-auth.md\",\"timestamp\":1789666354000},\"title\":\"OpenAI 认证\"},{\"name\":\"token-caching\",\"route\":\"/zh/cli/token-caching\",\"frontMatter\":{\"title\":\"Token 缓存与成本优化\",\"filePath\":\"content/zh/cli/token-caching.md\",\"timestamp\":1789666354000},\"title\":\"Token 缓存\"},{\"name\":\"themes\",\"route\":\"/zh/cli/themes\",\"frontMatter\":{\"title\":\"主题\",\"filePath\":\"content/zh/cli/themes.md\",\"timestamp\":1789666354000},\"title\":\"主题配置\"},{\"name\":\"tutorials\",\"route\":\"/zh/cli/tutorials\",\"frontMatter\":{\"title\":\"教程\",\"filePath\":\"content/zh/cli/tutorials.md\",\"timestamp\":1789666354000},\"title\":\"使用教程\"},{\"name\":\"welcome-back\",\"route\":\"/zh/cli/welcome-back\",\"frontMatter\":{\"title\":\"欢迎回来功能\",\"filePath\":\"content/zh/cli/welcome-back.md\",\"timestamp\":1789666354000},\"title\":\"欢迎回来功能\"}],\"title\":\"CLI 使用指南\"},{\"name\":\"core\",\"route\":\"/zh/core\",\"children\":[{\"data\":{\"index\":{\"title\":\"核心概述\"},\"tools-api\":{\"title\":\"工具 API\"},\"memport\":{\"title\":\"内存导入处理器\"}}},{\"name\":\"index\",\"route\":\"/zh/core\",\"frontMatter\":{\"title\":\"Qwen Code Core\",\"filePath\":\"content/zh/core/index.md\",\"timestamp\":1789666354000},\"title\":\"核心概述\"},{\"name\":\"tools-api\",\"route\":\"/zh/core/tools-api\",\"frontMatter\":{\"title\":\"Qwen Code Core: Tools API\",\"filePath\":\"content/zh/core/tools-api.md\",\"timestamp\":1789666354000},\"title\":\"工具 API\"},{\"name\":\"memport\",\"route\":\"/zh/core/memport\",\"frontMatter\":{\"title\":\"Memory Import Processor\",\"filePath\":\"content/zh/core/memport.md\",\"timestamp\":1789666354000},\"title\":\"内存导入处理器\"}],\"title\":\"核心详情\"},{\"name\":\"tools\",\"route\":\"/zh/tools\",\"children\":[{\"data\":{\"index\":{\"title\":\"工具概述\"},\"file-system\":{\"title\":\"文件系统工具\"},\"multi-file\":{\"title\":\"多文件读取工具\"},\"shell\":{\"title\":\"Shell 工具\"},\"web-fetch\":{\"title\":\"Web 获取工具\"},\"web-search\":{\"title\":\"Web 搜索工具\"},\"memory\":{\"title\":\"内存工具\"},\"todo-write\":{\"title\":\"Todo 写入工具\"},\"mcp-server\":{\"title\":\"MCP 服务器\"}}},{\"name\":\"index\",\"route\":\"/zh/tools\",\"frontMatter\":{\"title\":\"Qwen Code 工具\",\"filePath\":\"content/zh/tools/index.md\",\"timestamp\":1789666354000},\"title\":\"工具概述\"},{\"name\":\"file-system\",\"route\":\"/zh/tools/file-system\",\"frontMatter\":{\"title\":\"Qwen Code 文件系统工具\",\"filePath\":\"content/zh/tools/file-system.md\",\"timestamp\":1789666354000},\"title\":\"文件系统工具\"},{\"name\":\"multi-file\",\"route\":\"/zh/tools/multi-file\",\"frontMatter\":{\"title\":\"多文件读取工具 (read_many_files)\",\"filePath\":\"content/zh/tools/multi-file.md\",\"timestamp\":1789666354000},\"title\":\"多文件读取工具\"},{\"name\":\"shell\",\"route\":\"/zh/tools/shell\",\"frontMatter\":{\"title\":\"Shell 工具 (run_shell_command)\",\"filePath\":\"content/zh/tools/shell.md\",\"timestamp\":1789666354000},\"title\":\"Shell 工具\"},{\"name\":\"web-fetch\",\"route\":\"/zh/tools/web-fetch\",\"frontMatter\":{\"title\":\"Web Fetch Tool (web_fetch)\",\"filePath\":\"content/zh/tools/web-fetch.md\",\"timestamp\":1789666354000},\"title\":\"Web 获取工具\"},{\"name\":\"web-search\",\"route\":\"/zh/tools/web-search\",\"frontMatter\":{\"title\":\"Web Search Tool (web_search)\",\"filePath\":\"content/zh/tools/web-search.md\",\"timestamp\":1789666354000},\"title\":\"Web 搜索工具\"},{\"name\":\"memory\",\"route\":\"/zh/tools/memory\",\"frontMatter\":{\"title\":\"Memory Tool (save_memory)\",\"filePath\":\"content/zh/tools/memory.md\",\"timestamp\":1789666354000},\"title\":\"内存工具\"},{\"name\":\"todo-write\",\"route\":\"/zh/tools/todo-write\",\"frontMatter\":{\"title\":\"Todo Write Tool (todo_write)\",\"filePath\":\"content/zh/tools/todo-write.md\",\"timestamp\":1789666354000},\"title\":\"Todo 写入工具\"},{\"name\":\"mcp-server\",\"route\":\"/zh/tools/mcp-server\",\"frontMatter\":{\"title\":\"使用 Qwen Code 的 MCP 服务器\",\"filePath\":\"content/zh/tools/mcp-server.md\",\"timestamp\":1789666354000},\"title\":\"MCP 服务器\"}],\"title\":\"工具集合\"},{\"name\":\"checkpointing\",\"route\":\"/zh/checkpointing\",\"frontMatter\":{\"title\":\"Checkpointing\",\"filePath\":\"content/zh/checkpointing.md\",\"timestamp\":1789666354000},\"title\":\"检查点功能\"},{\"name\":\"extension\",\"route\":\"/zh/extension\",\"frontMatter\":{\"title\":\"Qwen Code Extensions\",\"filePath\":\"content/zh/extension.md\",\"timestamp\":1789666354000},\"title\":\"扩展开发\"},{\"name\":\"ide-integration\",\"route\":\"/zh/ide-integration\",\"frontMatter\":{\"title\":\"IDE 集成\",\"filePath\":\"content/zh/ide-integration.md\",\"timestamp\":1789666354000},\"title\":\"IDE 集成\"},{\"name\":\"telemetry\",\"route\":\"/zh/telemetry\",\"frontMatter\":{\"title\":\"Qwen Code 可观测性指南\",\"filePath\":\"content/zh/telemetry.md\",\"timestamp\":1789666354000},\"title\":\"可观测性\"},{\"name\":\"examples\",\"route\":\"/zh/examples\",\"children\":[{\"data\":{\"proxy-script\":{\"title\":\"代理脚本示例\"}}},{\"name\":\"proxy-script\",\"route\":\"/zh/examples/proxy-script\",\"frontMatter\":{\"title\":\"示例代理脚本\",\"filePath\":\"content/zh/examples/proxy-script.md\",\"timestamp\":1789666354000},\"title\":\"代理脚本示例\"}],\"title\":\"示例代码\"},{\"name\":\"npm\",\"route\":\"/zh/npm\",\"frontMatter\":{\"title\":\"Package Overview\",\"filePath\":\"content/zh/npm.md\",\"timestamp\":1789666354000},\"title\":\"包管理\"},{\"name\":\"gemini-ignore\",\"route\":\"/zh/gemini-ignore\",\"frontMatter\":{\"title\":\"忽略文件\",\"filePath\":\"content/zh/gemini-ignore.md\",\"timestamp\":1789666354000},\"title\":\"忽略文件配置\"},{\"name\":\"integration-tests\",\"route\":\"/zh/integration-tests\",\"frontMatter\":{\"title\":\"集成测试\",\"filePath\":\"content/zh/integration-tests.md\",\"timestamp\":1789666354000},\"title\":\"集成测试\"},{\"name\":\"keyboard-shortcuts\",\"route\":\"/zh/keyboard-shortcuts\",\"frontMatter\":{\"title\":\"Qwen Code 键盘快捷键\",\"filePath\":\"content/zh/keyboard-shortcuts.md\",\"timestamp\":1789666354000},\"title\":\"快捷键参考\"},{\"name\":\"sandbox\",\"route\":\"/zh/sandbox\",\"frontMatter\":{\"title\":\"Qwen Code 中的沙箱机制\",\"filePath\":\"content/zh/sandbox.md\",\"timestamp\":1789666354000},\"title\":\"沙箱机制\"},{\"name\":\"issue-and-pr-automation\",\"route\":\"/zh/issue-and-pr-automation\",\"frontMatter\":{\"title\":\"自动化与分类处理流程\",\"filePath\":\"content/zh/issue-and-pr-automation.md\",\"timestamp\":1789666354000},\"title\":\"自动化处理\"},{\"name\":\"troubleshooting\",\"route\":\"/zh/troubleshooting\",\"frontMatter\":{\"title\":\"故障排除指南\",\"filePath\":\"content/zh/troubleshooting.md\",\"timestamp\":1789666354000},\"title\":\"故障排除\"},{\"name\":\"tos-privacy\",\"route\":\"/zh/tos-privacy\",\"frontMatter\":{\"title\":\"Qwen Code:服务条款与隐私声明\",\"filePath\":\"content/zh/tos-privacy.md\",\"timestamp\":1789666354000},\"title\":\"服务条款与隐私\"},{\"name\":\"Uninstall\",\"route\":\"/zh/Uninstall\",\"frontMatter\":{\"title\":\"卸载 CLI\",\"filePath\":\"content/zh/Uninstall.md\",\"timestamp\":1789666354000},\"title\":\"卸载指南\"},{\"name\":\"subagents\",\"route\":\"/zh/subagents\",\"frontMatter\":{\"title\":\"Subagents\",\"filePath\":\"content/zh/subagents.md\",\"timestamp\":1789666354000},\"title\":\"Subagents\"}],\"navbar\":[\"$\",\"header\",null,{\"className\":\"nextra-navbar x:sticky x:top-0 x:z-30 x:w-full x:bg-transparent x:print:hidden x:max-md:[.nextra-banner:not([class$=hidden])~\u0026]:top-(--nextra-banner-height)\",\"children\":[[\"$\",\"div\",null,{\"className\":\"nextra-navbar-blur x:absolute x:-z-1 x:size-full nextra-border x:border-b x:backdrop-blur-md x:bg-nextra-bg/70\"}],[\"$\",\"nav\",null,{\"style\":{\"height\":\"var(--nextra-navbar-height)\"},\"className\":\"x:mx-auto x:flex x:max-w-(--nextra-content-width) x:items-center x:gap-4 x:pl-[max(env(safe-area-inset-left),1.5rem)] x:pr-[max(env(safe-area-inset-right),1.5rem)] x:justify-end\",\"children\":[[\"$\",\"$L15\",null,{\"href\":\"/\",\"className\":\"x:flex x:items-center x:me-auto x:transition-opacity x:focus-visible:nextra-focus x:hover:opacity-75\",\"aria-label\":\"Home page\",\"children\":[\"$\",\"span\",null,{\"className\":\"ms-2 select-none font-extrabold flex items-center\",\"title\":\"Qwen Code: AI Coding Agent\",\"children\":[[\"$\",\"img\",null,{\"src\":\"https://assets.alicdn.com/g/qwenweb/qwen-webui-fe/0.0.191/static/favicon.png\",\"alt\":\"Qwen Code\",\"width\":32,\"height\":32,\"className\":\"inline-block align-middle mr-2 \",\"style\":{\"verticalAlign\":\"middle\"}}],[\"$\",\"span\",null,{\"className\":\"text-[1.3rem] font-normal align-middle mr-1 max-md:hidden\",\"children\":\"Qwen\"}],[\"$\",\"span\",null,{\"className\":\"text-[1.3rem] font-normal align-middle max-md:hidden\",\"children\":\"Code\"}]]}]}],[\"$\",\"$L16\",null,{\"className\":\"\",\"children\":[[\"$\",\"a\",null,{\"href\":\"https://github.com/QwenLM/qwen-code\",\"target\":\"_blank\",\"rel\":\"noreferrer\",\"children\":[[\"$\",\"svg\",null,{\"fill\":\"currentColor\",\"viewBox\":\"3 3 18 18\",\"height\":\"24\",\"aria-label\":\"Project repository\",\"children\":[\"$\",\"path\",null,{\"d\":\"$17\"}]}],false],\"className\":\"x:focus-visible:nextra-focus\"}],\"$undefined\",[\"$\",\"$L18\",null,{\"currentLang\":\"zh\"}]]}]]}]]}],\"footer\":null,\"children\":[[\"$\",\"$L19\",null,{}],[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$7\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]]}]]}]}]\n"])</script><script>self.__next_f.push([1,"5:[\"$\",\"div\",null,{\"className\":\"x:mx-auto x:flex x:max-w-(--nextra-content-width)\",\"sourceCode\":\"$undefined\",\"children\":[\"$\",\"$L1a\",null,{\"value\":[{\"value\":\"启用遥测\",\"id\":\"启用遥测\",\"depth\":2},{\"value\":\"优先级顺序\",\"id\":\"优先级顺序\",\"depth\":3},{\"value\":\"示例配置\",\"id\":\"示例配置\",\"depth\":3},{\"value\":\"导出到文件\",\"id\":\"导出到文件\",\"depth\":3},{\"value\":\"运行 OTEL Collector\",\"id\":\"运行-otel-collector\",\"depth\":2},{\"value\":\"本地部署\",\"id\":\"本地部署\",\"depth\":3},{\"value\":\"Google Cloud\",\"id\":\"google-cloud\",\"depth\":3},{\"value\":\"日志和指标参考\",\"id\":\"日志和指标参考\",\"depth\":2},{\"value\":\"日志\",\"id\":\"日志\",\"depth\":3},{\"value\":\"Metrics\",\"id\":\"metrics\",\"depth\":3}],\"children\":[[\"$\",\"$L1b\",null,{}],[\"$\",\"$L1c\",null,{\"metadata\":{\"title\":\"Qwen Code 可观测性指南\",\"filePath\":\"content/zh/telemetry.md\",\"timestamp\":1789666354000},\"bottomContent\":\"$undefined\",\"children\":[[\"$\",\"div\",null,{\"id\":\"nextra-skip-nav\"}],[\"$\",\"main\",null,{\"data-pagefind-body\":true,\"children\":[[\"$\",\"h1\",null,{\"id\":\"$undefined\",\"className\":\"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-bold x:mt-2 x:text-4xl\",\"children\":[\"Qwen Code 可观测性指南\",\"$undefined\"]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":\"遥测(Telemetry)提供有关 Qwen Code 性能、健康状况和使用情况的数据。通过启用遥测功能,你可以通过 traces、metrics 和结构化日志来监控运行状态、调试问题并优化工具使用。\"}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[\"Qwen Code 的遥测系统基于 \",[\"$\",\"strong\",null,{\"children\":[[\"$\",\"a\",null,{\"href\":\"https://opentelemetry.io/\",\"target\":\"_blank\",\"rel\":\"noreferrer\",\"className\":\"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]\",\"children\":[\"OpenTelemetry\",[\" \",[\"$\",\"svg\",null,{\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"strokeWidth\":1.7,\"viewBox\":\"0 0 24 24\",\"height\":\"1em\",\"className\":\"x:inline x:align-baseline x:shrink-0\",\"children\":[[\"$\",\"path\",null,{\"d\":\"M7 17L17 7\"}],[\"$\",\"path\",null,{\"d\":\"M7 7h10v10\"}]]}]]]}],\" (OTEL)\"]}],\" 标准构建,允许你将数据发送到任何兼容的后端。\"]}],\"\\n\",[\"$\",\"h2\",null,{\"id\":\"启用遥测\",\"className\":\"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border\",\"children\":[\"启用遥测\",[\"$\",\"$L1d\",null,{\"id\":\"启用遥测\"}]]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[\"你可以通过多种方式启用遥测功能。配置主要通过 \",[\"$\",\"$L15\",null,{\"href\":\"./cli/configuration\",\"prefetch\":\"$undefined\",\"className\":\"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\".qwen/settings.json\"}],\" 文件\"]}],\" 和环境变量进行管理,但 CLI flags 可以在特定会话中覆盖这些设置。\"]}],\"\\n\",[\"$\",\"h3\",null,{\"id\":\"优先级顺序\",\"className\":\"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl\",\"children\":[\"优先级顺序\",[\"$\",\"$L1d\",null,{\"id\":\"优先级顺序\"}]]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":\"以下列出了应用遥测设置的优先级顺序,列表中越靠上的项优先级越高:\"}],\"\\n\",[\"$\",\"ol\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-decimal x:ms-6\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[\"$\",\"strong\",null,{\"children\":[\"CLI flags(针对 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen\"}],\" 命令):\"]}]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"--telemetry\"}],\" / \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"--no-telemetry\"}],\":覆盖 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry.enabled\"}],\"。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"--telemetry-target \u003clocal|gcp\u003e\"}],\":覆盖 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry.target\"}],\"。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"--telemetry-otlp-endpoint \u003cURL\u003e\"}],\":覆盖 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry.otlpEndpoint\"}],\"。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"--telemetry-log-prompts\"}],\" / \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"--no-telemetry-log-prompts\"}],\":覆盖 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry.logPrompts\"}],\"。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"--telemetry-outfile \u003cpath\u003e\"}],\":将遥测输出重定向到文件。详见 \",[\"$\",\"a\",null,{\"href\":\"#exporting-to-a-file\",\"className\":\"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]\",\"children\":\"导出到文件\"}],\"。\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[\"$\",\"strong\",null,{\"children\":\"环境变量:\"}]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"OTEL_EXPORTER_OTLP_ENDPOINT\"}],\":覆盖 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry.otlpEndpoint\"}],\"。\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":[\"工作区设置文件(\",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\".qwen/settings.json\"}],\"):\"]}],\" 该 project-specific 文件中 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry\"}],\" 对象的值。\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":[\"用户设置文件(\",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"~/.qwen/settings.json\"}],\"):\"]}],\" 该 global user 文件中 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry\"}],\" 对象的值。\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"默认值:\"}],\" 如果以上均未设置,则应用以下默认值。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry.enabled\"}],\": \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"false\"}]]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry.target\"}],\": \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"local\"}]]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry.otlpEndpoint\"}],\": \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"http://localhost:4317\"}]]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry.logPrompts\"}],\": \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"true\"}]]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":[\"对于 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"npm run telemetry -- --target=\u003cgcp|local\u003e\"}],\" 脚本:\"]}],\"\\n该脚本的 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"--target\"}],\" 参数\",[\"$\",\"strong\",null,{\"children\":\"仅\"}],\"在该脚本执行期间和目的范围内覆盖 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry.target\"}],\"(即选择启动哪个 collector)。它不会永久更改你的 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"settings.json\"}],\"。脚本会首先查看 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"settings.json\"}],\" 中的 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry.target\"}],\" 作为默认值。\"]}],\"\\n\",[\"$\",\"h3\",null,{\"id\":\"示例配置\",\"className\":\"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl\",\"children\":[\"示例配置\",[\"$\",\"$L1d\",null,{\"id\":\"示例配置\"}]]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[\"你可以将以下代码添加到你的工作区配置文件 (\",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\".qwen/settings.json\"}],\") 或用户配置文件 (\",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"~/.qwen/settings.json\"}],\") 中,以启用遥测功能并将数据发送到 Google Cloud:\"]}],\"\\n\",[\"$\",\"div\",null,{\"data-pagefind-ignore\":\"all\",\"className\":\"nextra-code x:relative x:not-first:mt-[1.25em]\",\"children\":[\"$undefined\",[\"$\",\"pre\",null,{\"className\":\"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose\",\"tabIndex\":\"0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2\",\"children\":[[\"$\",\"$L1e\",null,{\"children\":[\"$\",\"svg\",null,{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"height\":\"1em\",\"children\":[\"$\",\"path\",null,{\"d\":\"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z\"}]}]}],false]}],[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":[[\"$\",\"span\",null,{\"children\":[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},\"children\":\"{\"}]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" \\\"telemetry\\\"\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},\"children\":\": {\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" \\\"enabled\\\"\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},\"children\":\": \"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\"true\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},\"children\":\",\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" \\\"target\\\"\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},\"children\":\": \"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},\"children\":\"\\\"gcp\\\"\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},\"children\":\" },\"}]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" \\\"sandbox\\\"\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},\"children\":\": \"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\"false\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},\"children\":\"}\"}]}]]}]]}]]}],\"\\n\",[\"$\",\"h3\",null,{\"id\":\"导出到文件\",\"className\":\"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl\",\"children\":[\"导出到文件\",[\"$\",\"$L1d\",null,{\"id\":\"导出到文件\"}]]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":\"你可以将所有遥测数据导出到一个文件中,方便在本地查看。\"}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[\"要启用文件导出功能,请使用 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"--telemetry-outfile\"}],\" 参数,并指定你希望输出的文件路径。此功能必须配合 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"--telemetry-target=local\"}],\" 一起使用。\"]}],\"\\n\",[\"$\",\"div\",null,{\"data-pagefind-ignore\":\"all\",\"className\":\"nextra-code x:relative x:not-first:mt-[1.25em]\",\"children\":[\"$undefined\",[\"$\",\"pre\",null,{\"className\":\"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose\",\"tabIndex\":\"0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2\",\"children\":[[\"$\",\"$L1e\",null,{\"children\":[\"$\",\"svg\",null,{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"height\":\"1em\",\"children\":[\"$\",\"path\",null,{\"d\":\"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z\"}]}]}],false]}],[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":[[\"$\",\"span\",null,{\"children\":\" \"}],\"\\n\",[\"$\",\"span\",null,{\"children\":[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},\"children\":\"# 设置你希望输出的文件路径\"}]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},\"children\":\"TELEMETRY_FILE\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},\"children\":\"=\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},\"children\":\"\\\".qwen/telemetry.log\\\"\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"children\":\" \"}],\"\\n\",[\"$\",\"span\",null,{\"children\":[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},\"children\":\"# 使用本地遥测功能运行 Qwen Code\"}]}],\"\\n\",[\"$\",\"span\",null,{\"children\":\" \"}],\"\\n\",[\"$\",\"span\",null,{\"children\":[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},\"children\":\"# 注意:必须设置 --telemetry-otlp-endpoint=\\\"\\\" 来覆盖默认的\"}]}],\"\\n\",[\"$\",\"span\",null,{\"children\":\" \"}],\"\\n\",[\"$\",\"span\",null,{\"children\":[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},\"children\":\"# OTLP 导出器,确保遥测数据写入本地文件。\"}]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},\"children\":\"qwen\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" --telemetry\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" \\\\\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" --telemetry-target=local\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" \\\\\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" --telemetry-otlp-endpoint=\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},\"children\":\"\\\"\\\"\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" \\\\\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" --telemetry-outfile=\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},\"children\":\"\\\"\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},\"children\":\"$$TELEMETRY_FILE\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},\"children\":\"\\\"\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" \\\\\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"children\":[[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" --prompt\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},\"children\":\" \\\"What is OpenTelemetry?\\\"\"}]]}]]}]]}]]}],\"\\n\",[\"$\",\"h2\",null,{\"id\":\"运行-otel-collector\",\"className\":\"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border\",\"children\":[\"运行 OTEL Collector\",[\"$\",\"$L1d\",null,{\"id\":\"运行-otel-collector\"}]]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[\"OTEL Collector 是一个接收、处理和导出遥测数据的服务。\\nCLI 可以使用 OTLP/gRPC 或 OTLP/HTTP 协议发送数据。\\n你可以通过 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"--telemetry-otlp-protocol\"}],\" flag\\n或 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"settings.json\"}],\" 文件中的 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"telemetry.otlpProtocol\"}],\" 设置来指定使用哪种协议。更多\\n详情请参见 \",[\"$\",\"$L15\",null,{\"href\":\"./cli/configuration#--telemetry-otlp-protocol\",\"prefetch\":\"$undefined\",\"className\":\"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]\",\"children\":\"配置文档\"}],\"。\"]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[\"在 \",[\"$\",\"a\",null,{\"href\":\"https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/\",\"target\":\"_blank\",\"rel\":\"noreferrer\",\"className\":\"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]\",\"children\":[\"documentation\",[\" \",[\"$\",\"svg\",null,{\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"strokeWidth\":1.7,\"viewBox\":\"0 0 24 24\",\"height\":\"1em\",\"className\":\"x:inline x:align-baseline x:shrink-0\",\"children\":[[\"$\",\"path\",null,{\"d\":\"M7 17L17 7\"}],[\"$\",\"path\",null,{\"d\":\"M7 7h10v10\"}]]}]]]}],\" 中了解更多关于 OTEL exporter 标准配置的信息。\"]}],\"\\n\",[\"$\",\"h3\",null,{\"id\":\"本地部署\",\"className\":\"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl\",\"children\":[\"本地部署\",[\"$\",\"$L1d\",null,{\"id\":\"本地部署\"}]]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[\"使用 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"npm run telemetry -- --target=local\"}],\" 命令可以自动化设置本地 telemetry pipeline,包括在你的 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\".qwen/settings.json\"}],\" 文件中配置必要的设置。底层脚本会安装 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"otelcol-contrib\"}],\"(OpenTelemetry Collector)和 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"jaeger\"}],\"(用于查看 traces 的 Jaeger UI)。使用方式如下:\"]}],\"\\n\",[\"$\",\"ol\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-decimal x:ms-6\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"运行命令\"}],\":\\n在 repository 根目录下执行以下命令:\"]}],\"\\n\",[\"$\",\"div\",null,{\"data-pagefind-ignore\":\"all\",\"className\":\"nextra-code x:relative x:not-first:mt-[1.25em]\",\"children\":[\"$undefined\",[\"$\",\"pre\",null,{\"className\":\"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose\",\"tabIndex\":\"0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2\",\"children\":[[\"$\",\"$L1e\",null,{\"children\":[\"$\",\"svg\",null,{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"height\":\"1em\",\"children\":[\"$\",\"path\",null,{\"d\":\"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z\"}]}]}],false]}],[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":[\"$\",\"span\",null,{\"children\":[[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},\"children\":\"npm\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},\"children\":\" run\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},\"children\":\" telemetry\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" --\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" --target=local\"}]]}]}]]}]]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":\"脚本将会:\"}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":\"如有需要,下载 Jaeger 和 OTEL。\"}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":\"启动一个本地 Jaeger 实例。\"}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":\"启动一个配置好的 OTEL collector,用于接收来自 Qwen Code 的数据。\"}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":\"自动在你的 workspace settings 中启用 telemetry。\"}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":\"退出时,自动禁用 telemetry。\"}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"查看 traces\"}],\":\\n打开浏览器并访问 \",[\"$\",\"strong\",null,{\"children\":[\"$\",\"a\",null,{\"href\":\"http://localhost:16686\",\"target\":\"_blank\",\"rel\":\"noreferrer\",\"className\":\"x:focus-visible:nextra-focus x:text-primary-600 x:underline x:hover:no-underline x:decoration-from-font x:[text-underline-position:from-font]\",\"children\":[\"http://localhost:16686\",[\" \",[\"$\",\"svg\",null,{\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"strokeWidth\":1.7,\"viewBox\":\"0 0 24 24\",\"height\":\"1em\",\"className\":\"x:inline x:align-baseline x:shrink-0\",\"children\":[[\"$\",\"path\",null,{\"d\":\"M7 17L17 7\"}],[\"$\",\"path\",null,{\"d\":\"M7 7h10v10\"}]]}]]]}]}],\" 进入 Jaeger UI,在这里你可以查看 Qwen Code 操作的详细 traces。\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"查看 logs 和 metrics\"}],\":\\n脚本会将 OTEL collector 的输出(包括 logs 和 metrics)重定向到 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"~/.qwen/tmp/\u003cprojectHash\u003e/otel/collector.log\"}],\"。脚本还会提供链接和命令,方便你本地查看 telemetry 数据(traces、metrics、logs)。\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"停止服务\"}],\":\\n在脚本运行的终端中按下 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"Ctrl+C\"}],\",即可停止 OTEL Collector 和 Jaeger 服务。\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"h3\",null,{\"id\":\"google-cloud\",\"className\":\"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl\",\"children\":[\"Google Cloud\",[\"$\",\"$L1d\",null,{\"id\":\"google-cloud\"}]]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[\"使用 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"npm run telemetry -- --target=gcp\"}],\" 命令可以自动化设置一个本地 OpenTelemetry collector,将数据转发到你的 Google Cloud 项目,并自动配置 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\".qwen/settings.json\"}],\" 文件中的必要设置。该脚本底层会安装 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"otelcol-contrib\"}],\"。使用步骤如下:\"]}],\"\\n\",[\"$\",\"ol\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-decimal x:ms-6\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"前置条件\"}],\":\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":\"拥有一个 Google Cloud 项目 ID。\"}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"导出 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"GOOGLE_CLOUD_PROJECT\"}],\" 环境变量,以便 OTEL collector 可以读取。\\n\",[\"$\",\"div\",null,{\"data-pagefind-ignore\":\"all\",\"className\":\"nextra-code x:relative x:not-first:mt-[1.25em]\",\"children\":[\"$undefined\",[\"$\",\"pre\",null,{\"className\":\"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose\",\"tabIndex\":\"0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2\",\"children\":[[\"$\",\"$L1e\",null,{\"children\":[\"$\",\"svg\",null,{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"height\":\"1em\",\"children\":[\"$\",\"path\",null,{\"d\":\"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z\"}]}]}],false]}],[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":[\"$\",\"span\",null,{\"children\":[[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},\"children\":\"export\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},\"children\":\" OTLP_GOOGLE_CLOUD_PROJECT\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},\"children\":\"=\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},\"children\":\"\\\"your-project-id\\\"\"}]]}]}]]}]]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"完成 Google Cloud 身份验证(例如运行 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"gcloud auth application-default login\"}],\",或确保已设置 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"GOOGLE_APPLICATION_CREDENTIALS\"}],\")。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":\"确保你的 Google Cloud 账户或服务账户拥有以下 IAM 角色:“Cloud Trace Agent”、“Monitoring Metric Writer” 和 “Logs Writer”。\"}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"运行命令\"}],\":\\n在项目根目录下执行以下命令:\"]}],\"\\n\",[\"$\",\"div\",null,{\"data-pagefind-ignore\":\"all\",\"className\":\"nextra-code x:relative x:not-first:mt-[1.25em]\",\"children\":[\"$undefined\",[\"$\",\"pre\",null,{\"className\":\"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose\",\"tabIndex\":\"0\",\"children\":[[\"$\",\"div\",null,{\"className\":\"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2\",\"children\":[[\"$\",\"$L1e\",null,{\"children\":[\"$\",\"svg\",null,{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"height\":\"1em\",\"children\":[\"$\",\"path\",null,{\"d\":\"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z\"}]}]}],false]}],[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":[\"$\",\"span\",null,{\"children\":[[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},\"children\":\"npm\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},\"children\":\" run\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},\"children\":\" telemetry\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" --\"}],[\"$\",\"span\",null,{\"style\":{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},\"children\":\" --target=gcp\"}]]}]}]]}]]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":\"脚本将会:\"}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"如果需要,下载 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"otelcol-contrib\"}],\" 二进制文件。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":\"启动一个 OTEL collector,配置为接收来自 Qwen Code 的数据并导出到你指定的 Google Cloud 项目。\"}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"自动在你的工作区设置(\",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\".qwen/settings.json\"}],\")中启用 telemetry 并关闭 sandbox 模式。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":\"提供直接链接,用于在 Google Cloud Console 中查看 traces、metrics 和 logs。\"}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":\"在退出时(Ctrl+C),尝试恢复你原来的 telemetry 和 sandbox 设置。\"}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"运行 Qwen Code\"}],\":\\n在另一个终端中运行你的 Qwen Code 命令。这将生成 telemetry 数据,由 collector 捕获。\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"在 Google Cloud 中查看 telemetry 数据\"}],\":\\n使用脚本提供的链接跳转到 Google Cloud Console,查看你的 traces、metrics 和 logs。\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"查看本地 collector 日志\"}],\":\\n脚本将本地 OTEL collector 的输出重定向到 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"~/.qwen/tmp/\u003cprojectHash\u003e/otel/collector-gcp.log\"}],\"。脚本还会提供链接和命令,方便你在本地查看或 tail collector 日志。\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"停止服务\"}],\":\\n在脚本运行的终端中按下 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"Ctrl+C\"}],\",即可停止 OTEL Collector。\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"h2\",null,{\"id\":\"日志和指标参考\",\"className\":\"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border\",\"children\":[\"日志和指标参考\",[\"$\",\"$L1d\",null,{\"id\":\"日志和指标参考\"}]]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":\"以下部分描述了为 Qwen Code 生成的日志和指标的结构。\"}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"所有日志和指标都包含一个通用属性 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"sessionId\"}],\"。\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"h3\",null,{\"id\":\"日志\",\"className\":\"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl\",\"children\":[\"日志\",[\"$\",\"$L1d\",null,{\"id\":\"日志\"}]]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":\"日志是带有时间戳的特定事件记录。Qwen Code 会记录以下事件:\"}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.config\"}],\":该事件在启动时发生一次,记录 CLI 的配置信息。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"属性\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"model\"}],\" (string)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"embedding_model\"}],\" (string)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"sandbox_enabled\"}],\" (boolean)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"core_tools_enabled\"}],\" (string)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"approval_mode\"}],\" (string)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"api_key_enabled\"}],\" (boolean)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"vertex_ai_enabled\"}],\" (boolean)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"code_assist_enabled\"}],\" (boolean)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"log_prompts_enabled\"}],\" (boolean)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"file_filtering_respect_git_ignore\"}],\" (boolean)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"debug_mode\"}],\" (boolean)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"mcp_servers\"}],\" (string)\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.user_prompt\"}],\":该事件在用户提交 prompt 时发生。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"属性\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"prompt_length\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"prompt\"}],\"(如果 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"log_prompts_enabled\"}],\" 配置为 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"false\"}],\",则该属性会被排除)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"auth_type\"}]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.tool_call\"}],\":该事件在每次函数调用时发生。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"属性\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"function_name\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"function_args\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"duration_ms\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"success\"}],\" (boolean)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"decision\"}],\" (string: “accept”, “reject”, “auto_accept”, 或 “modify”,如适用)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"error\"}],\"(如适用)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"error_type\"}],\"(如适用)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"metadata\"}],\"(如适用,string -\u003e any 的字典)\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.api_request\"}],\":该事件在向 Qwen API 发起请求时发生。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"属性\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"model\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"request_text\"}],\"(如适用)\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.api_error\"}],\":该事件在 API 请求失败时发生。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"属性\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"model\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"error\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"error_type\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"status_code\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"duration_ms\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"auth_type\"}]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.api_response\"}],\":该事件在收到 Qwen API 响应时发生。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"属性\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"model\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"status_code\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"duration_ms\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"error\"}],\"(可选)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"input_token_count\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"output_token_count\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"cached_content_token_count\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"thoughts_token_count\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"tool_token_count\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"response_text\"}],\"(如适用)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"auth_type\"}]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.flash_fallback\"}],\":该事件在 Qwen Code 切换为使用 flash 作为 fallback 时发生。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"属性\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"auth_type\"}]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.slash_command\"}],\":该事件在用户执行斜杠命令时发生。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"属性\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"command\"}],\" (string)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"subcommand\"}],\" (string,如适用)\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"h3\",null,{\"id\":\"metrics\",\"className\":\"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl\",\"children\":[\"Metrics\",[\"$\",\"$L1d\",null,{\"id\":\"metrics\"}]]}],\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[\"Metrics 是对行为随时间变化的数值测量。Qwen Code 收集以下指标(指标名称仍保留为 \",[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.*\"}],\" 以保持兼容性):\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.session.count\"}],\" (Counter, Int):每次 CLI 启动时递增一次。\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.tool.call.count\"}],\" (Counter, Int):统计工具调用次数。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"Attributes\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"function_name\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"success\"}],\" (boolean)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"decision\"}],\" (string: “accept”, “reject”, 或 “modify”,如果适用)\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"tool_type\"}],\" (string: “mcp”, 或 “native”,如果适用)\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.tool.call.latency\"}],\" (Histogram, ms):测量工具调用延迟。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"Attributes\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"function_name\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"decision\"}],\" (string: “accept”, “reject”, 或 “modify”,如果适用)\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.api.request.count\"}],\" (Counter, Int):统计所有 API 请求次数。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"Attributes\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"model\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"status_code\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"error_type\"}],\" (如果适用)\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.api.request.latency\"}],\" (Histogram, ms):测量 API 请求延迟。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"Attributes\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"model\"}]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.token.usage\"}],\" (Counter, Int):统计使用的 token 数量。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"Attributes\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"model\"}]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"type\"}],\" (string: “input”, “output”, “thought”, “cache”, 或 “tool”)\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.file.operation.count\"}],\" (Counter, Int):统计文件操作次数。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"Attributes\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"operation\"}],\" (string: “create”, “read”, “update”):文件操作类型。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"lines\"}],\" (Int, 如果适用):文件中的行数。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"mimetype\"}],\" (string, 如果适用):文件的 MIME 类型。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"extension\"}],\" (string, 如果适用):文件扩展名。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"ai_added_lines\"}],\" (Int, 如果适用):AI 添加/修改的行数。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"ai_removed_lines\"}],\" (Int, 如果适用):AI 删除/修改的行数。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"user_added_lines\"}],\" (Int, 如果适用):用户在 AI 提议的更改中添加/修改的行数。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"user_removed_lines\"}],\" (Int, 如果适用):用户在 AI 提议的更改中删除/修改的行数。\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[\"\\n\",[\"$\",\"p\",null,{\"className\":\"x:not-first:mt-[1.25em] x:leading-7\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"qwen-code.chat_compression\"}],\" (Counter, Int):统计聊天压缩操作次数。\"]}],\"\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"strong\",null,{\"children\":\"Attributes\"}],\":\\n\",[\"$\",\"ul\",null,{\"className\":\"x:[:is(ol,ul)_\u0026]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"tokens_before\"}],\" (Int):压缩前上下文中的 token 数量。\"]}],\"\\n\",[\"$\",\"li\",null,{\"className\":\"x:my-[.5em]\",\"children\":[[\"$\",\"code\",null,{\"className\":\"nextra-code\",\"dir\":\"ltr\",\"children\":\"tokens_after\"}],\" (Int):压缩后上下文中的 token 数量。\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}]]}]]}]]}]}]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Qwen Code 可观测性指南 | \"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"x\"}],[\"$\",\"meta\",\"4\",{\"name\":\"msapplication-TileColor\",\"content\":\"#fff\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Qwen Code\"}],[\"$\",\"meta\",\"7\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"default\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:title\",\"content\":\"Qwen Code 可观测性指南 | \"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:description\",\"content\":\"x\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image\",\"content\":\"https://assets.vercel.com/image/upload/v1572282926/swr/twitter-card.jpg\"}],[\"$\",\"meta\",\"11\",{\"name\":\"twitter:card\",\"content\":\"summary\"}],[\"$\",\"meta\",\"12\",{\"name\":\"twitter:site\",\"content\":\"@qwenLLM\"}],[\"$\",\"meta\",\"13\",{\"name\":\"twitter:title\",\"content\":\"Qwen Code 可观测性指南 | \"}],[\"$\",\"meta\",\"14\",{\"name\":\"twitter:description\",\"content\":\"x\"}],[\"$\",\"meta\",\"15\",{\"name\":\"twitter:image\",\"content\":\"https://assets.vercel.com/image/upload/v1572282926/swr/twitter-card.jpg\"}]]\n4:null\n"])</script></body></html> |