Generally I’d not use telemetry for retrieving historical data at all. There could be a config like:
config :live_dashboard, MyLiveDashboard,
historical_data: %{
[:my_app, :repo, :query] => {MyStorage, :historical_metric_data, []}
}
Which would make the dashboard run MyStorage.historical_metric_data([:my_app, :repo, :query])
when it comes to rendering a chart for [:my_app, :repo, :query]
.