---
title: "ezgh obs datasets sampling stats"
description: "Show how many traces a dataset's sampling received and kept."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh obs datasets sampling stats

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh obs datasets sampling stats <dataset> [--window 1h|24h] [flags]
```

Show what trace sampling received and kept for a dataset over the last hour (`--window` 1h, the default) or day (24h): traces and spans, and for each rule how many traces it decided (matched) and kept. Rules are the current policy's in order, then default, then (memory) for traces decided early because the sampler's buffer was full, then rules that have since been renamed or removed. When some of the window's counts weren't recorded, the window is marked incomplete.

Part of [`ezgh obs datasets sampling`](/cli/reference/obs-datasets-sampling).

## Examples

```sh
ezgh obs datasets sampling stats production
ezgh obs datasets sampling stats production --window 24h -o json
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--window` | string | `1h` | the window: 1h or 24h |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/obs-datasets-sampling-stats/index.mdx
