Skip to content

Add blog for trace tail sampling. - #919

Merged
wu-sheng merged 2 commits into
masterfrom
tail-sampling-blog
Sep 7, 2026
Merged

Add blog for trace tail sampling.#919
wu-sheng merged 2 commits into
masterfrom
tail-sampling-blog

Conversation

@wankai123

Copy link
Copy Markdown
Member

No description provided.

@netlify

netlify Bot commented Sep 7, 2026

Copy link
Copy Markdown

Deploy Preview for skywalking-website-preview ready!

Name Link
🔨 Latest commit 76e8467
🔍 Latest deploy log https://app.netlify.com/projects/skywalking-website-preview/deploys/6a9e74f26edcd300083f6d61
😎 Deploy Preview https://deploy-preview-919--skywalking-website-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

decision back to it with `-1`.
- **Never a half-deleted trace.** If any part of a trace might live in data the current
compaction cannot see, the trace is kept and judged another time.
- **Plugin problems never delete data.** A sampler that fails to load leaves the group unfiltered,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugin load failure preserves the previous working policy. On a failed reload, BanyanDB keeps the previous good sampler set, which can continue dropping traces; it does not necessarily leave the group unfiltered. Retain-all applies when there is no previous working set. See metadata.go.

Suggested wording: “A plugin load failure preserves the previous working sampler configuration; without one, all traces are retained.” Please also update the matching claims in “Turning it on” and “Plugin Load Failures”, and the Chinese version.

```

Each trace arrives with its ID, the tag columns you asked for, and optionally its span bodies;
you return a keep mask. Several samplers can be chained, each seeing what the previous one kept.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every sampler receives the same input batch. The implementation does not pass only the previous sampler's survivors to the next plugin. It invokes all samplers on the same batch and combines their successful keep masks with logical AND; a failed link is bypassed. See the SDK chain contract. This distinction matters for batch-dependent custom policies, metrics, and processing cost.

Suggested wording: “Several samplers can be chained. Each receives the same batch, and their successful keep masks are combined with AND.” Please update the Chinese version too.

- **`PIPELINE_EVENT_MERGE`**, the default, runs during routine compaction. It is best-effort: a
trace is judged only when the data around it happens to be compacted, so a quiet shard may hold
traces that are never evaluated before they expire.
- **`PIPELINE_EVENT_FINALIZE`** adds a periodic background sweep over data that has settled, so

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FINALIZE is a bounded backstop, not an every-trace guarantee. After the initial round, the scanner requires enough newly arrived unsampled bytes, observes a cooldown, and stops at a lifetime round cap. Resource and safety guards can also defer work or retain traces. Thus, for example, late arrivals below the byte threshold need not receive another FINALIZE evaluation. See warrantsFinalize.

Please describe this as a periodic, bounded sweep that improves evaluation coverage for settled data independently of routine compaction, rather than guaranteeing every trace is eventually judged. The same guarantee appears in the diagram and “Limitations and what is next”; please adjust those and the Chinese version as well.

…verage

Plugin load failure keeps the previous working sampler set rather than
leaving the group unfiltered; chained samplers all receive the same batch
with keep masks combined by AND; FINALIZE is a bounded backstop, not an
every-trace guarantee. Applied to both the English and Chinese posts.
@wu-sheng
wu-sheng merged commit acca894 into master Sep 7, 2026
5 checks passed
@wu-sheng
wu-sheng deleted the tail-sampling-blog branch September 7, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants