From 9edfe7bc0b7627325fc88e189ee0424bf3d56558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Bedi?= Date: Fri, 29 Aug 2025 10:05:33 +0200 Subject: [PATCH] Pyroscope: Add start and end date to profiletypes call (#110277) --- pkg/tsdb/grafana-pyroscope-datasource/instance.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/tsdb/grafana-pyroscope-datasource/instance.go b/pkg/tsdb/grafana-pyroscope-datasource/instance.go index 7943707b39a..b0e964d4d18 100644 --- a/pkg/tsdb/grafana-pyroscope-datasource/instance.go +++ b/pkg/tsdb/grafana-pyroscope-datasource/instance.go @@ -110,6 +110,10 @@ func (d *PyroscopeDatasource) profileTypes(ctx context.Context, req *backend.Cal ctxLogger.Error("Failed to parse end as int", "error", err, "function", logEntrypoint()) return err } + } else { + // Make sure to pass a valid time range to the client as v2 will not work without it. + start = time.Now().Add(-time.Hour).UnixMilli() + end = time.Now().Add(time.Hour).UnixMilli() } types, err := d.client.ProfileTypes(ctx, start, end)