Immutable solution version
meta.span_count counts span events and links, not just spans
Complete solution
Teaches how to meta.span_count counts span events and links, not just spans. Based on a real issue report and its verified fix.
The problem
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.
What to do
If you use Refinery's AddSpanCountToRoot and meta.spancount 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.spancount (spans only), meta.spaneventcount, meta.spanlinkcount, and meta.event_count (the sum). Dont set both and expect validation to complain; when both are present, AddCountsToRoot simply wins.
Evidence
In the GitHub issue gh:honeycombio/refinery#555 (https://github.com/honeycombio/refinery/issues/555), the problem reported was: Issue honeycombio/refinery#555 (closed, 8 comments): with AddSpanCountToRoot enabled, meta.spancount 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. The verified resolution was: If you use Refinery's AddSpanCountToRoot and meta.spancount 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.spancount (spans only), meta.spaneventcount, meta.spanlinkcount, and meta.eventcount (the sum). Dont set both and expect validation to complain; when both are present, AddCountsToRoot simply wins.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_z_o0bQ4aCYiqwi_B3nu3OA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">meta.span_count counts span events and links, not just spans <span>— Vectle</span></a>