Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User-Space, Statically Defined Tracing (USDT) #787

Open
wants to merge 3 commits into
base: 0.22
Choose a base branch
from

Conversation

HiHat
Copy link
Contributor

@HiHat HiHat commented Dec 15, 2024

This PR adds documentation for User-Space, Statically Defined Tracing (USDT) as well as tracepoints (including documentation and usage examples).

User-space, Statically Defined Tracing (USDT) allows for more observability during development, debugging, code review, and production usage. The tracepoints make it possible to keep track of custom statistics and enable detailed monitoring of otherwise hidden internals and have little to no performance impact when unused. Linux kernels (4.x or newer) can hook into the tracepoints and execute eBPF programs in a kernel VM once the tracepoint is called.

This PR includes, for example, tracepoints for in- and outbound P2P messages.

The two main eBPF front-ends with support for USDT are bpftrace an BPF Compiler Collection (BCC). BCC is used for complex tools and daemons and bpftrace is preferred for one-liners and shorter scripts. Example tracing scripts for both are provided with this PR.

This PR adds following tracepoints:

  • net:inbound_message
  • net:outbound_message
  • net:inbound_connection
  • net:outbound_connection
  • net:closed_connnection
  • net:evicted_inbound_connection
  • net:misbehaving_connection
  • valildation:block_connected
  • mempool:added
  • mempool:removed
  • mempool:replaced
  • mempool:rejected

See doc/tracing.md and contrib/tracing/ for documentation and example tracing scripts.

@auto-assign auto-assign bot requested a review from andyoknen December 15, 2024 21:38
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.

1 participant