Pyroscope: Add start and end date to profiletypes call (#110277)

This commit is contained in:
Zoltán Bedi
2025-08-29 10:05:33 +02:00
committed by GitHub
parent 533513039e
commit 9edfe7bc0b
@@ -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)