diff --git a/src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs b/src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs
index 95997dbbf5..47f1afe650 100644
--- a/src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs
+++ b/src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs
@@ -40,18 +40,20 @@ public class ReportSiteTask : RecurringHostedServiceBase
{
}
- ///
- /// Runs the background task to send the anonymous ID
- /// to telemetry service
- ///
- public override async Task PerformExecuteAsync(object? state){
+ ///
+ /// Runs the background task to send the anonymous ID
+ /// to telemetry service
+ ///
+ public override async Task PerformExecuteAsync(object? state)
+ {
if (_runtimeState.Level is not RuntimeLevel.Run)
{
// We probably haven't installed yet, so we can't get telemetry.
return;
}
- if (_telemetryService.TryGetTelemetryReportData(out TelemetryReportData? telemetryReportData) is false)
+ TelemetryReportData? telemetryReportData = await _telemetryService.GetTelemetryReportDataAsync();
+ if (telemetryReportData is null)
{
_logger.LogWarning("No telemetry marker found");