You can configure sampling rules in the UI or as YAML (Kubernetes CRDs). The schema matches the same concepts as the UI, so GitOps workflows can express the same behavior as in the product. Every rule has three parts: a Source scope that defines which workloads the rule applies to, an Operation that picks the specific operations within that scope, and a Keep Percentage that controls how much matching traffic is retained. The Source scope options are identical across all three categories; the Operation and Keep Percentage options differ by category. Each rule can also carry an optional Name and Notes for easier identification.Documentation Index
Fetch the complete documentation index at: https://docs.odigos.io/llms.txt
Use this file to discover all available pages before exploring further.
Source scope
A rule can be scoped to one of:- Entire cluster — the rule applies to every source in the cluster.
- Specific Source — one or more named sources (services).
- Specific Namespace — one or more Kubernetes namespaces.
- Specific Programming Language — one or more runtimes: Python, Java, NodeJS, .Net, PHP, Ruby, or Go.
Operation
The Operation options depend on the rule’s category.- Noisy Operation
- Highly Relevant
- Cost Reduction
- All Operations — every operation in scope.
- HTTP Server — match HTTP requests received by a server. Configure:
- An HTTP route (exact path) or HTTP route prefix.
- A method: Any, GET, POST, PATCH, DELETE, or PUT.
- HTTP Client — match outbound HTTP calls made by the source. Configure:
- A server address (the remote host being called).
- A templated path (exact) or templated path prefix.
- A method: Any, GET, POST, PATCH, DELETE, or PUT.
Keep Percentage
Each rule defines what fraction of matching traffic is retained. The available options differ by category:| Category | Options |
|---|---|
| Noisy Operation | Drop All, or Keep at most N% |
| Highly Relevant | Keep All, or Keep at least N% |
| Cost Reduction | Keep at most N% (set N = 0 to drop everything) |
Enabled
Every rule has an Enabled toggle that controls whether it participates in sampling decisions. Disabled rules stay in your configuration but are excluded from evaluation, which makes the toggle useful for several patterns:- Temporary suspension. Turn a rule off during an incident, debugging session, or evaluation period when you need broader visibility—without losing the rule’s configuration.
- Disable vs. delete. Disabling preserves the matcher, scope, and Keep Percentage so you can re-enable later without re-authoring. Use it when a rule may still be useful later but isn’t needed right now.
- “What-if” metrics. Disabled rules continue to record matching metrics: how many traces would have matched, and how many would have been kept or dropped if the rule were active. Useful for sizing a candidate rule’s impact before committing to it.
Name and Notes
Both fields are optional and exist purely to make rules easier to identify and maintain—they have no effect on evaluation or matching.- Name — a short, free-text label for the rule. The name appears in the rule list in the UI and may also surface on metrics and span attributes, so use something descriptive that makes the rule recognizable in dashboards and queries.
- Notes — free-text describing why the rule exists. Use this to capture context that isn’t obvious from the matcher itself: the incident that triggered the rule, the team that owns it, or the cost target it’s serving. Especially useful when auditing rules or onboarding new operators.