Skip to content

Add telemetry plugin system for sampling profiler#148628

Closed
tonym97 wants to merge 1 commit intopython:mainfrom
tonym97:telemetry-plugins
Closed

Add telemetry plugin system for sampling profiler#148628
tonym97 wants to merge 1 commit intopython:mainfrom
tonym97:telemetry-plugins

Conversation

@tonym97
Copy link
Copy Markdown

@tonym97 tonym97 commented Apr 15, 2026

Introduce a pluggable telemetry framework that allows external data sources (e.g. GPU metrics) to be collected alongside CPU sampling profiles.

  • New --plugin CLI flag (repeatable) wired through attach, run, live-attach, live-run, and replay code paths
  • TelemetryHelperManager lifecycle (start/poll/stop) integrated into SampleProfiler sampling loop
  • Binary format gains sidecar chunk support via TelemetryChunkWriter for writing plugin events, and replay_sidecar_to_sink for reading them back
  • Live TUI gets a telemetry panel widget with keybindings for toggling (g), cycling plugins (n), and cycling display modes (m)
  • New Lib/profiling/sampling/telemetry/ package with plugin registry, helper subprocess manager, chunk I/O, and an NVIDIA GPU plugin

Introduce a pluggable telemetry framework that allows external data
sources (e.g. GPU metrics) to be collected alongside CPU sampling
profiles.

- New --plugin CLI flag (repeatable) wired through attach, run,
  live-attach, live-run, and replay code paths
- TelemetryHelperManager lifecycle (start/poll/stop) integrated into
  SampleProfiler sampling loop
- Binary format gains sidecar chunk support via TelemetryChunkWriter
  for writing plugin events, and replay_sidecar_to_sink for reading
  them back
- Live TUI gets a telemetry panel widget with keybindings for toggling
  (g), cycling plugins (n), and cycling display modes (m)
- New Lib/profiling/sampling/telemetry/ package with plugin registry,
  helper subprocess manager, chunk I/O, and an NVIDIA GPU plugin

Made-with: Cursor
@tonym97 tonym97 requested a review from pablogsal as a code owner April 15, 2026 18:47
@python-cla-bot
Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 15, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@tonym97 tonym97 closed this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant