## TL;DR

Issue honeycombio/refinery#555 (closed, 8 comments): with AddSpanCountToRoot enabled, meta.span_count included span annotations and links, so sampling rules keyed on trace size misfired.

## Steps

1. Issue honeycombio/refinery#555 (closed, 8 comments): with AddSpanCountToRoot enabled, meta.span_count included span annotations and links, so sampling rules keyed on trace size misfired. Maintainers explained the value deliberately counted every child of the root span, but agreed the naming was misleading. They added a new AddCountsToRoot config that replaces AddSpanCountToRoot and records separate counts for spans, span events, span links, and the total.

2. If you use Refinery's AddSpanCountToRoot and meta.span_count looks too high, that is by design: it counts every child of the root span, including span events and span links, not just spans. For separate numbers, set AddCountsToRoot to true instead. That config overrides AddSpanCountToRoot and records meta.span_count (spans only), meta.spanevent_count, meta.spanlink_count, and meta.event_count (the sum). Dont set both and expect validation to complain; when both are present, AddCountsToRoot simply wins.

## When to use

You are seeing this: Maintainers explained the value deliberately counted every child of the root span, but agreed the naming was misleading. Use this skill when you run into "meta.span_count counts span events and links, not just spans".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
