Skip to content

Telemetry deamon 😈 #338

Merged
wtgee merged 16 commits intodevelopfrom
feat/telemetry-daemon
Mar 18, 2026
Merged

Telemetry deamon 😈 #338
wtgee merged 16 commits intodevelopfrom
feat/telemetry-daemon

Conversation

@wtgee
Copy link
Member

@wtgee wtgee commented Mar 18, 2026

Adds a telemetry server that would be a replacement for the database utils.

@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 76.04651% with 103 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.90%. Comparing base (1b01890) to head (4a3ef2e).
⚠️ Report is 17 commits behind head on develop.

Files with missing lines Patch % Lines
src/panoptes/utils/telemetry/server.py 74.44% 58 Missing ⚠️
src/panoptes/utils/cli/telemetry.py 79.38% 27 Missing ⚠️
src/panoptes/utils/telemetry/client.py 75.51% 12 Missing ⚠️
src/panoptes/utils/telemetry/__init__.py 73.91% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #338      +/-   ##
===========================================
- Coverage    83.76%   81.90%   -1.86%     
===========================================
  Files           21       25       +4     
  Lines         1355     1785     +430     
===========================================
+ Hits          1135     1462     +327     
- Misses         220      323     +103     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new telemetry subsystem to PANOPTES Utilities, including a FastAPI-based server that writes NDJSON streams, a small Python client wrapper, and a Typer CLI surface to run/stop the service.

Changes:

  • Added panoptes.utils.telemetry server/client modules with site/run streams, noon-boundary rotation, and /current snapshot endpoints.
  • Added panoptes-utils telemetry CLI subcommands plus tests covering server and client behavior.
  • Updated docs, dependencies, and changelog to reflect the new optional telemetry extra.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/test_utils.py Makes libc name assertion more robust across platforms/paths.
tests/test_telemetry_server.py Adds FastAPI TestClient coverage for telemetry server endpoints and file outputs.
tests/test_telemetry_client.py Adds tests for TelemetryClient wrappers and error handling.
src/panoptes/utils/telemetry/server.py Implements TelemetryService + FastAPI app + process launcher.
src/panoptes/utils/telemetry/client.py Implements requests-based TelemetryClient and error type.
src/panoptes/utils/telemetry/init.py Exposes telemetry symbols at the package level.
src/panoptes/utils/cli/telemetry.py Adds Typer commands to run/stop the telemetry server.
src/panoptes/utils/cli/main.py Registers telemetry as a panoptes-utils subcommand.
README.md Documents telemetry installation and usage examples.
pyproject.toml Adds telemetry optional extra and httpx test dependency.
CHANGELOG.md Notes telemetry feature addition (currently with placeholder ref).
AGENTS.md Adds contributor notes and CLI guidance relevant to new commands.

You can also share your feedback on Copilot code review. Take the survey.

wtgee and others added 13 commits March 18, 2026 08:35
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot suggestions.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wtgee wtgee force-pushed the feat/telemetry-daemon branch from 157ca55 to d1268a0 Compare March 18, 2026 18:35
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wtgee wtgee requested a review from Copilot March 18, 2026 18:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new telemetry subsystem to PANOPTES Utilities, including a local FastAPI server for append-only NDJSON telemetry logging, a small Python client wrapper, and new panoptes-utils telemetry CLI commands, with accompanying tests and documentation.

Changes:

  • Introduces panoptes.utils.telemetry server/client modules (run context support, /current snapshot API, NDJSON persistence).
  • Adds panoptes-utils telemetry CLI (run, stop, current with optional follow/live display) and wires it into the main CLI with optional-dependency fallback.
  • Adds tests + documentation (Sphinx page + README updates) and updates dependencies/extras for telemetry support.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_telemetry_server.py End-to-end API/service tests for events, run handling, NDJSON output, and rotation logic.
tests/test_telemetry_client.py Tests Python client wrappers against an in-process FastAPI TestClient.
tests/test_telemetry_cli.py Tests Typer CLI output, follow behavior, and verbose flag wiring using fakes.
src/panoptes/utils/telemetry/server.py Implements TelemetryService + FastAPI app + process launcher.
src/panoptes/utils/telemetry/client.py Implements requests-style TelemetryClient wrapper and error handling.
src/panoptes/utils/telemetry/init.py Provides lazy imports and a stable public API surface for telemetry components.
src/panoptes/utils/cli/telemetry.py Adds CLI commands to run/stop server and inspect current telemetry with Rich rendering.
src/panoptes/utils/cli/main.py Registers telemetry subcommand when extras are available; otherwise provides a placeholder/help message.
src/panoptes/utils/cli/image.py Switches user-facing output to Rich print to match CLI conventions.
README.md Documents telemetry install/use and updates CLI help references.
pyproject.toml Adds telemetry optional extra (fastapi/uvicorn), adds httpx for tests, and adds rich dependency.
docs/telemetry.rst Adds dedicated telemetry server documentation (CLI/API/examples).
docs/index.rst Adds telemetry page to the Sphinx toctree.
CHANGELOG.md Adds telemetry feature entry and a related fix note.

You can also share your feedback on Copilot code review. Take the survey.

wtgee and others added 2 commits March 18, 2026 09:01
Small suggestions from copilot.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@wtgee wtgee merged commit d3aee26 into develop Mar 18, 2026
3 checks passed
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