Skip to content

Fix: Remove monitored_pids metric from process_monitor#29

Merged
laplaque merged 2 commits intomasterfrom
fix/remove-monitored-pids-metric
Jul 3, 2025
Merged

Fix: Remove monitored_pids metric from process_monitor#29
laplaque merged 2 commits intomasterfrom
fix/remove-monitored-pids-metric

Conversation

@laplaque
Copy link
Copy Markdown
Owner

@laplaque laplaque commented Jul 2, 2025

Problem

The plugin was generating warning messages:

Metric 'monitored_pids' not defined in TOML configuration, rejecting

Root Cause

The monitored_pids metric was being generated in common/process_monitor.py but was not defined in the TOML configuration file (common/manifest.toml). The OpenTelemetry connector validates that all metrics are properly defined before accepting them.

Solution

Removed the monitored_pids entry from the metrics dictionary in aggregate_process_metrics() function. This metric was only used for debugging purposes and is not needed as a legitimate monitoring metric since:

  • Process IDs are ephemeral and change on restart
  • The information is already available through other means
  • It's not a meaningful metric for monitoring purposes

Changes

  • Removed "monitored_pids": ",".join(process_pids) from metrics dictionary
  • Kept the process_pids list for internal logging purposes

Testing

All Tests Passed:

  • OTEL Connector Tests: 9/9 passed
  • Process Monitor Tests: 13/13 passed
  • Metrics Verification: Confirmed working
  • Test Collector: Used proper testing procedure per cline rules

After this change, the warning messages no longer appear in the logs, and all legitimate metrics continue to be processed normally.

Impact

  • ✅ Eliminates warning messages
  • ✅ No impact on legitimate metrics
  • ✅ Maintains all debugging capabilities through logs
  • ✅ Fully tested with OpenTelemetry test collector

Copilot AI review requested due to automatic review settings July 2, 2025 23:53

This comment was marked as outdated.

- Remove monitored_pids metric from process_monitor.py to eliminate TOML warnings
- Document comprehensive CPU usage investigation findings in ADR-005
- Confirm CPU usage metrics DO register correctly in Instana
- Evidence shows no bugs in data processing stack - system works as designed
- Investigation concluded testing methodology was root cause, not system defects
@laplaque laplaque force-pushed the fix/remove-monitored-pids-metric branch from 923d1ec to d2327ee Compare July 3, 2025 03:21
@laplaque laplaque requested a review from Copilot July 3, 2025 03:22
Copy link
Copy Markdown
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

This PR removes the monitored_pids metric from the process monitor to eliminate OpenTelemetry validation warnings and updates documentation and workflow to reflect the change.

  • Removed monitored_pids entry from the metrics dictionary in aggregate_process_metrics().
  • Added release notes (both TAG and global) and ADR documenting the CPU investigation.
  • Simplified PR validation workflow to call a reusable workflow.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docs/releases/TAG_v0.1.04.md Added detailed TAG release notes for version 0.1.04
docs/releases/RELEASE_NOTES.md Inserted v0.1.04 release entry into global release notes
docs/adr/005-cpu-usage-investigation-findings.md Created ADR for CPU usage investigation findings
common/process_monitor.py Removed "monitored_pids" from aggregated metrics dictionary
.github/workflows/pr-validation.yml Replaced in-file validation steps with a call to reusable workflow

@laplaque laplaque merged commit 35afe1e into master Jul 3, 2025
@laplaque laplaque deleted the fix/remove-monitored-pids-metric branch July 3, 2025 03:30
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