Skip to content

feat(phase2): deprecate monitoring interface types (Task 2.3) #191

Description

@kcenon

Summary

Deprecate thread_system monitoring interface types in favor of unified common::interfaces types.

This PR completes the thread_system portion of Phase 2, Task 2.3.

Changes

1. File-Level Deprecation Warning

Added comprehensive deprecation notice at the top of monitoring_interface.h:

  • Clear warning that the file is deprecated
  • Migration path to common::interfaces types
  • Timeline: Deprecated 2025-10-02, Removal in v2.0.0
  • Reference to common_system header

2. Namespace-Level Documentation

Added namespace deprecation with type mapping:

/**
 * @namespace monitoring_interface
 * @brief DEPRECATED: Thread-specific monitoring types
 *
 * Replacement mapping:
 * - monitoring_interface::thread_pool_metrics → common::interfaces::thread_pool_metrics
 * - monitoring_interface::worker_metrics → common::interfaces::worker_metrics
 * - monitoring_interface::system_metrics → common::interfaces::system_metrics
 * - monitoring_interface::monitoring_interface → common::interfaces::IMonitor
 */

3. Per-Type Deprecation Attributes

Marked all deprecated types with @deprecated tags:

  • system_metrics
  • thread_pool_metrics
  • worker_metrics
  • metrics_snapshot
  • monitoring_interface (class)
  • null_monitoring

Build Impact

Deprecation Warnings Visible

Compilation now shows warnings like:

warning: 'logger_interface' is deprecated: Use common::interfaces::ILogger instead

No Breaking Changes

  • Existing code continues to work
  • All tests pass
  • Examples build successfully

Migration Guide

Before (thread_system-specific)

#include <kcenon/thread/interfaces/monitoring_interface.h>

monitoring_interface::thread_pool_metrics metrics;
metrics.jobs_completed = 100;
metrics.jobs_pending = 5;

After (unified common_system)

#include <kcenon/common/interfaces/monitoring_interface.h>

common::interfaces::thread_pool_metrics metrics;
metrics.jobs_completed.value = 100;
metrics.jobs_pending.value = 5;

Testing

  • ✅ All unit tests pass (5/5 suites)
  • ✅ All examples build successfully
  • ✅ Deprecation warnings visible during compilation
  • ✅ No functional regressions

Timeline

  • Deprecated: 2025-10-02 (Phase 2)
  • Removal: Version 2.0.0

Related PRs

Checklist

  • All tests pass
  • Examples build successfully
  • Deprecation warnings added
  • Migration guide documented
  • Timeline specified
  • No breaking changes

Phase 2 Progress

Task 2.3: Monitoring Interface Unification - Completed


Linked PR: #28 feat(phase2): deprecate monitoring interface types (Task 2.3)

Metadata

Metadata

Assignees

Labels

asyncAsynchronous operationsbuildBuild system and configurationci-cdCI/CD and build automationdependenciesExternal dependencies managementenhancementNew feature or requestloggingLogging related changestestingTesting related issuesthreadingThreading and concurrency

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions