Skip to content

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

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Tobiloba0:issue-616-logging
Jun 2, 2026
Merged

monitoring: register cost services and expose hourly cost metric#696
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Tobiloba0:issue-616-logging

Conversation

@Tobiloba0
Copy link
Copy Markdown

@Tobiloba0 Tobiloba0 commented May 30, 2026

#Closes #616

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

@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

Kindly resolve conflict and fix workflow.

@Tobiloba0
Copy link
Copy Markdown
Author

Maintainer please approve submitted pr

@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

Please the conflict is yet to be resolved.
Always pull from the main before pushing

@Tobiloba0 Tobiloba0 force-pushed the issue-616-logging branch from 1746a1f to 8c15b99 Compare June 2, 2026 16:14
@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@Tobiloba0
Copy link
Copy Markdown
Author

Hello @RUKAYAT-CODER, I have successfully rebased the branch onto the latest upstream/main entirely and I have resolved the conflicts in monitoring.module.ts, and squashed the redundant build cache commits. The PR history is now clean, linear, and ready for your review. Thanks!

@RUKAYAT-CODER RUKAYAT-CODER merged commit c87b64e into rinafcode:main Jun 2, 2026
1 check failed
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

2 participants