Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Jan 22, 2026

🎉 This pull request has been checked successfully and will be merged soon. 🎉

Branch unstable (21cabba) and #8647 are embarked together for merge.

This pull request has been created by Mergify to speculatively check the mergeability of #8647.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.

Required conditions of queue default for merge:

  • check-success=local-testnet-success
  • check-success=test-suite-success

Required conditions to stay in the queue:

---
checking_base_sha: 21cabba1a2ba23539f60630f52f55ec13254c9de
previous_failed_batches: []
pull_requests:
  - number: 8647
...

jimmygchen and others added 5 commits January 12, 2026 16:06
Add AllowedRootSpanSampler to filter out traces that don't originate
from known instrumented code paths. This reduces noise from library
code and uninstrumented paths when exporting to OTLP backends.

Uses the idiomatic OpenTelemetry ParentBased sampler pattern:
- Root spans are sampled only if their name is in LH_BN_ROOT_SPAN_NAMES
- Child spans automatically inherit their parent's sampling decision
- Efficient head-based sampling with no per-span tracking overhead

This enables effective trace sampling in production - without filtering,
the majority of traces would be noise, making low sample rates ineffective
at capturing meaningful instrumented code paths.
    Replace the allowlist-based AllowedRootSpanSampler with a generic `PrefixBasedSampler` that filters spans by prefix. Root spans now use the `lh_` prefix to identify Lighthouse instrumented entry points.

    Changes:
    - Rename `lighthouse_tracing` to `tracing_samplers` and move to `common/`
    - Replace `AllowedRootSpanSampler` with `PrefixBasedSampler`
    - Remove all `SPAN_*` constants, use inline strings at call sites
    - Remove `LH_BN_ROOT_SPAN_NAMES` allowlist

    This eliminates the need to maintain an allowlist of span names. New instrumented spans just need the `lh_` prefix to be exported. The sampler is now generic and can be reused by validator_client.
@cla-assistant
Copy link

cla-assistant bot commented Jan 22, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ jimmygchen
❌ mergify[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant
Copy link

cla-assistant bot commented Jan 22, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ jimmygchen
❌ mergify[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

@mergify mergify bot closed this Jan 22, 2026
@mergify mergify bot deleted the mergify/merge-queue/3cfa00c5b2 branch January 22, 2026 05:11
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.

2 participants