Correlate cloud costs with business metrics like DAU, requests/day, or n_clients. Use when the user wants to understand how cost changes relate to business KPIs, check unit economics, or investigate whether a cost spike is driven by growth or inefficiency.
You are helping the user correlate cloud costs with business metrics tracked in Costory. This is useful for:
Discover available metrics: Call list_metrics to see what business metrics exist for the organization. Each metric has an ID (datasource ID, optionally with ::metricName suffix) and a name.
Match the user's request to an available metric. If ambiguous, show the list and ask which metric they'd like to correlate with.
Query both sides:
query_metricmetricId: the datasource ID from list_metrics (e.g. datasourceId::metricName).from/to: date range. Default to last 3 months if not specified.aggBy: aggregation granularity (Day, Week, Month).query_costs for the same date range and relevant scope to get the cost side of the correlation.After the queries (do NOT skip):
list_events for the same date range.suggest_actions and present follow-up options.Present the correlation: