Skip to content

refactor(agent): remove injection metric logs#448

Merged
skevetter merged 2 commits intomainfrom
remove-inject-metrics
Feb 5, 2026
Merged

refactor(agent): remove injection metric logs#448
skevetter merged 2 commits intomainfrom
remove-inject-metrics

Conversation

@skevetter
Copy link
Copy Markdown
Owner

@skevetter skevetter commented Feb 5, 2026

  • refactor(agent): remove injection metric logs
  • fix: remove redundant logging

Summary by CodeRabbit

  • Refactor
    • Simplified binary acquisition method signature
    • Removed metrics collection capability from agent injection process
    • Updated error handling to use typed stage identifiers for improved clarity

Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

The PR removes metrics collection infrastructure from the agent injection flow and modifies the BinaryManager API to return only a binary reader and error, eliminating the source name return value. It introduces a typed InjectStage constant system to replace string stage literals in error handling.

Changes

Cohort / File(s) Summary
BinaryManager API simplification
pkg/agent/binary.go
Modified AcquireBinary return signature from (io.ReadCloser, string, error) to (io.ReadCloser, error), removing the SourceName return value.
Metrics removal and stage typing
pkg/agent/inject.go
Removed metrics collection scaffolding (InjectionMetrics, MetricsCollector, LogMetricsCollector) and the InjectOptions.MetricsCollector field. Added typed InjectStage constant system with three stages (Inject, CommandExecution, VersionCheck). Changed InjectError.Stage field from string to InjectStage type. Simplified injectContext struct by removing attempt and metrics fields. Updated error handling and version check flow to operate without metrics tracking.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'refactor(agent): remove injection metric logs' accurately describes the main change: removal of metrics collection and related logging from the agent injection flow.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-inject-metrics

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@skevetter skevetter marked this pull request as ready for review February 5, 2026 23:19
@skevetter skevetter merged commit 0a4eb15 into main Feb 5, 2026
72 of 73 checks passed
@skevetter skevetter deleted the remove-inject-metrics branch February 5, 2026 23:25
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