Skip to content

monitoring: register cost services and expose hourly cost metric#696

Open
Tobiloba0 wants to merge 1 commit into
rinafcode:mainfrom
Tobiloba0:issue-616-logging
Open

monitoring: register cost services and expose hourly cost metric#696
Tobiloba0 wants to merge 1 commit into
rinafcode:mainfrom
Tobiloba0:issue-616-logging

Conversation

@Tobiloba0
Copy link
Copy Markdown

Summary

Register cost monitoring services to enable collection, tracking, and exposure of the infra_hourly_cost_usd metric for operational dashboards, monitoring, and alerting workflows.

Changes

  • Added CostTrackingService to support infrastructure cost metric tracking.
  • Added CostSchedulerService to schedule periodic cost metric collection.
  • Added AwsCostCollectorService to provide AWS cost data collection capabilities.
  • Registered all cost-related services in monitoring.module.ts providers and exports for application-wide availability.

Files Changed

monitoring.module.ts

Testing

Ran monitoring unit tests:

npm test -- --testPathPattern=monitoring -i

All monitoring-related tests passed successfully.

Notes / Follow-ups

  • The scheduler currently records a placeholder hourly cost value (0) until cost data integration is completed.

  • Future enhancements include:

    • Implementing POST /metrics/cost for local cost metric ingestion and validation.
    • Implementing GET /monitoring/cost/summary for cost reporting and monitoring.
    • Integrating with AWS Cost Explorer to retrieve real infrastructure cost data (requires AWS SDK configuration and appropriate credentials).

Closes #616

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.

Implement content negotiation for API responses

1 participant