Skip to content

feat(analytics): implement resource-to-value correlation and hybrid attribution#292

Merged
victoriacheng15 merged 1 commit intomainfrom
feat/analytics-unit-economics-baseline
Mar 11, 2026
Merged

feat(analytics): implement resource-to-value correlation and hybrid attribution#292
victoriacheng15 merged 1 commit intomainfrom
feat/analytics-unit-economics-baseline

Conversation

@victoriacheng15
Copy link
Owner

Summary

Completes the core architectural loop of the Analytics Engine by implementing "Resource-to-Value" correlation. This update enables hybrid energy attribution across K3s and host services, enforces a sustainable data lifecycle via retention policies, and ingests business production counters (Syncs/Tasks) to enable high-fidelity Unit Economics analysis.

List of Changes

  • Value Chain Integration: Implemented "Business Value Ingestion" by bridging production counters (thought/document syncs and webhook/synthetic requests) from Ingestion and Proxy services into the analytical dataset.
  • Hybrid Visibility Architecture: Eliminated energy "dark matter" by implementing a CPU-share attribution model that account for non-containerized systemd services alongside Kubernetes pods.
  • Data Lifecycle Governance: Enforced automated storage sustainability via a 30-day retention policy in TimescaleDB hypertables, ensuring long-term performance and manageable growth.
  • Relational Integrity: Unified the mapping layer to synchronize cluster-realistic identifiers with business feature IDs, providing a consistent anchor for relational joins between costs and value.

Verification

  • make test passes for internal/analytics verifying hybrid attribution and value unit recording.
  • Database schema verified via EnsureSchema to include retention policies and metric_kind enums.
  • Manual verification of analytics_metrics table confirms recording of energy, cost, carbon, and value_unit kinds.

@victoriacheng15 victoriacheng15 merged commit bbe7dc3 into main Mar 11, 2026
3 checks passed
@victoriacheng15 victoriacheng15 deleted the feat/analytics-unit-economics-baseline branch March 11, 2026 21:33
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