PageSourceSearch

https://docs.logz.io/assets/js/cad3879b.c8adfadc.js

js logz.io collected 2026-10-02 02:18:49 UTC 8,741 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmy_website=self.webpackChunkmy_website||[]).push([[2779],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>d});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),p=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=p(r),g=n,d=u["".concat(s,".").concat(g)]||u[g]||m[g]||o;return r?a.createElement(d,i(i({ref:t},c),{},{components:r})):a.createElement(d,i({ref:t},c))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:n,i[1]=l;for(var p=2;p<o;p++)i[p]=r[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,r)}g.displayName="MDXCreateElement"},57481:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var a=r(87462),n=(r(67294),r(3905));const o={sidebar_position:4,title:"Drop Filters - Trace Sampling",image:"https://dytvr9ot2sszz.cloudfront.net/logz-docs/social-assets/docs-social.jpg",description:"How Sampling rules can improve your monitoring",keywords:["Sampling","data","sampling rules","traces","tracing"],slug:"/user-guide/data-hub/sampling-rules"},i=void 0,l={unversionedId:"user-guide/data-hub/drop-filters/sampling-rules",id:"user-guide/data-hub/drop-filters/sampling-rules",title:"Drop Filters - Trace Sampling",description:"How Sampling rules can improve your monitoring",source:"@site/docs/user-guide/data-hub/drop-filters/sampling-rules.md",sourceDirName:"user-guide/data-hub/drop-filters",slug:"/user-guide/data-hub/sampling-rules",permalink:"/docs/user-guide/data-hub/sampling-rules",draft:!1,editUrl:"https://github.com/logzio/documentation/tree/master/docs/user-guide/data-hub/drop-filters/sampling-rules.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4,title:"Drop Filters - Trace Sampling",image:"https://dytvr9ot2sszz.cloudfront.net/logz-docs/social-assets/docs-social.jpg",description:"How Sampling rules can improve your monitoring",keywords:["Sampling","data","sampling rules","traces","tracing"],slug:"/user-guide/data-hub/sampling-rules"},sidebar:"tutorialSidebar",previous:{title:"Drop Metric Filters",permalink:"/docs/user-guide/data-hub/drop-filters/drop-fiters-metrics"},next:{title:"Log Metrics",permalink:"/docs/user-guide/data-hub/logstometrics"}},s={},p=[{value:"Trace Sampling overview",id:"trace-sampling-overview",level:2},{value:"Create Custom Trace Sampling Rules",id:"create-custom-trace-sampling-rules",level:2},{value:"Sampling actions",id:"sampling-actions",level:3},{value:"Configure and apply Trace Sampling rules",id:"configure-and-apply-trace-sampling-rules",level:2}],c={toc:p},u="wrapper";
1function m(e){let{components:t,...r}=e;return(0,n.kt)(u,(0,a.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Trace Sampling lets you select which traces to index and monitor within your account, helping you focus on real-time events in your systems and services. Applying Drop Filters also optimizes quota usage by indexing only critical and actionable spans or full traces."),(0,n.kt)("h2",{id:"trace-sampling-overview"},"Trace Sampling overview"),(0,n.kt)("p",null,"The Sampling Rules screen includes the following:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},(0,n.kt)("strong",{parentName:"p"},"Account Selection")," - Choose the Tracing accounts where you'd like to create and apply Drop Filters. Each account requires a separate set of rules.")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},(0,n.kt)("strong",{parentName:"p"},"Main Table")," - Displays your sampling rules, including descriptions and the services they apply to. If no services are listed, the rule applies to all spans."))),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://dytvr9ot2sszz.cloudfront.net/logz-docs/distributed-tracing/sampling-rules/sampling-rules.png",alt:"Sampling rules overview"})),(0,n.kt)("h2",{id:"create-custom-trace-sampling-rules"},"Create Custom Trace Sampling Rules"),(0,n.kt)("admonition",{type:"tip"},(0,n.kt)("p",{parentName:"admonition"},"Creating individual rules for each tracing account allows for more precise span volume control.")),(0,n.kt)("p",null,"To create a rule, click ",(0,n.kt)("strong",{parentName:"p"},"New Rule")," at the top right. Then, select the services where this rule will apply. To manually add services, check ",(0,n.kt)("strong",{parentName:"p"},"These Services")," and choose from the dropdown menu."),(0,n.kt)("h3",{id:"sampling-actions"},"Sampling actions"),(0,n.kt)("p",null,"Each rule can have one of the following actions:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Keep a percentage of traces (choose a value from 1-100)."),(0,n.kt)("li",{parentName:"ul"},"Keep traces slower than a specified duration (must exceed 1 ms)."),(0,n.kt)("li",{parentName:"ul"},"Keep all traces with span errors to focus on identifying issues.")),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://dytvr9ot2sszz.cloudfront.net/logz-docs/distributed-tracing/sampling-rules/create-a-rule.png",alt:"Create a sampling rule"})),(0,n.kt)("p",null,"While each rule can have only one action, you can create multiple rules for the same services. For example:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Sample all traces with spans containing errors."),(0,n.kt)("li",{parentName:"ul"},"Sample traces slower than 2000 ms."),(0,n.kt)("li",{parentName:"ul"},"Sample 50% of traces."),(0,n.kt)("li",{parentName:"ul"},"Sample all traces from a critical service.")),(0,n.kt)("admonition",{title:"Important",type:"caution"},(0,n.kt)("p",{parentName:"admonition"},"To ",(0,n.kt)("strong",{parentName:"p"},"activate the new set of rules"),", navigate to the ",(0,n.kt)("a",{parentName:"p",href:"https://app.logz.io/#/dashboard/settings/tracing-yaml-configuration/"},"YAML Configuration Generator")," and follow the instructions.\n",(0,n.kt)("img",{parentName:"p",src:"https://dytvr9ot2sszz.cloudfront.net/logz-docs/distributed-tracing/sampling-rules/click-on-yaml.png",alt:"Yaml configuration"}))),(0,n.kt)("h2",{id:"configure-and-apply-trace-sampling-rules"},"Configure and apply Trace Sampling rules"),(0,n.kt)("p",null,"Start by creating your sampling rules for the chosen account."),(0,n.kt)("p",null,"Configure them using the OTEL Configuration Generator, which creates a YAML file for your collector to run the rules."),(0,n.kt)("p",null,"Access the generator by clicking the button at the top right or navigating to ",(0,n.kt)("strong",{parentName:"p"},(0,n.kt)("a",{parentName:"strong",href:"https://app.logz.io/#/dashboard/settings/tracing-yaml-configuration/"},"Tracing > OTEL configuration")),". "),(0,n.kt)("p",null,"Select your configuration method based on your OTEL deployment strategy (currently supports Localhost; Docker and Kubernetes support is coming soon)."),(0,n.kt)("p",null,"After selecting the Tracing account, follow the instructions to apply your rules to the collector."),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://dytvr9ot2sszz.cloudfront.net/logz-docs/distributed-tracing/sampling-rules/otel-configuration-screen.png",alt:"Create a sampling rule"})))}m.isMDXComponent=!0}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.