Skip to content

Comments

feat(telemetry): implement app-extended-heartbeat timer#8215

Draft
khanayan123 wants to merge 1 commit intomasterfrom
ayan.khan/app-extended-heartbeat
Draft

feat(telemetry): implement app-extended-heartbeat timer#8215
khanayan123 wants to merge 1 commit intomasterfrom
ayan.khan/app-extended-heartbeat

Conversation

@khanayan123
Copy link

Add timer-based scheduling for app-extended-heartbeat telemetry events. Sends configuration, dependencies, and integrations data every 24 hours to improve reliability in long-running sessions.

Changes:

  • Add ExtendedHeartbeatInterval setting to TelemetrySettings
  • Add TelemetryExtendedHeartbeatInterval configuration key
  • Implement _extendedHeartbeatTimer in TelemetryController
  • Wire up PushExtendedHeartbeat() method
  • Update test files with new configuration parameter
  • Reuse existing BuildExtendedHeartbeatData() payload builder

Summary of changes

Reason for change

Implementation details

Test coverage

Other details

Add timer-based scheduling for app-extended-heartbeat telemetry events.
Sends configuration, dependencies, and integrations data every 24 hours
to improve reliability in long-running sessions.

Changes:
- Add ExtendedHeartbeatInterval setting to TelemetrySettings
- Add TelemetryExtendedHeartbeatInterval configuration key
- Implement _extendedHeartbeatTimer in TelemetryController
- Wire up PushExtendedHeartbeat() method
- Update test files with new configuration parameter
- Reuse existing BuildExtendedHeartbeatData() payload builder

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@dd-trace-dotnet-ci-bot
Copy link

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8215) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration77.74 ± (77.59 - 77.89) ms76.74 ± (76.73 - 77.04) ms-1.3%
.NET Framework 4.8 - Bailout
duration82.64 ± (82.41 - 82.80) ms81.17 ± (81.03 - 81.37) ms-1.8%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1097.39 ± (1097.58 - 1104.49) ms1099.17 ± (1099.29 - 1106.46) ms+0.2%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms23.32 ± (23.25 - 23.39) ms23.26 ± (23.20 - 23.32) ms-0.3%
process.time_to_main_ms88.87 ± (88.69 - 89.05) ms89.29 ± (89.08 - 89.50) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.89 - 10.90) MB10.91 ± (10.90 - 10.91) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms23.27 ± (23.21 - 23.33) ms23.25 ± (23.19 - 23.30) ms-0.1%
process.time_to_main_ms90.89 ± (90.64 - 91.13) ms90.87 ± (90.64 - 91.09) ms-0.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.93 - 10.94) MB10.94 ± (10.93 - 10.94) MB+0.0%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms244.86 ± (240.65 - 249.06) ms236.99 ± (232.91 - 241.06) ms-3.2%
process.time_to_main_ms501.65 ± (500.83 - 502.48) ms503.59 ± (502.75 - 504.44) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.52 ± (47.50 - 47.54) MB47.66 ± (47.63 - 47.68) MB+0.3%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%
.NET 6 - Baseline
process.internal_duration_ms22.11 ± (22.06 - 22.16) ms22.10 ± (22.05 - 22.15) ms-0.1%
process.time_to_main_ms77.78 ± (77.59 - 77.97) ms78.00 ± (77.83 - 78.17) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.62 - 10.63) MB10.64 ± (10.64 - 10.64) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms22.07 ± (22.02 - 22.12) ms21.91 ± (21.87 - 21.95) ms-0.7%
process.time_to_main_ms78.87 ± (78.68 - 79.05) ms79.27 ± (79.08 - 79.47) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.69 ± (10.69 - 10.70) MB10.75 ± (10.74 - 10.75) MB+0.5%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms240.55 ± (236.25 - 244.85) ms244.23 ± (239.99 - 248.47) ms+1.5%✅⬆️
process.time_to_main_ms485.17 ± (484.47 - 485.86) ms485.60 ± (484.88 - 486.32) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.25 ± (48.23 - 48.28) MB48.35 ± (48.33 - 48.37) MB+0.2%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms20.31 ± (20.25 - 20.36) ms20.19 ± (20.14 - 20.23) ms-0.6%
process.time_to_main_ms76.79 ± (76.61 - 76.97) ms76.56 ± (76.40 - 76.73) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.66 ± (7.66 - 7.66) MB7.68 ± (7.67 - 7.69) MB+0.3%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms20.37 ± (20.33 - 20.41) ms20.28 ± (20.22 - 20.34) ms-0.4%
process.time_to_main_ms78.22 ± (78.04 - 78.40) ms78.09 ± (77.91 - 78.27) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.71 ± (7.71 - 7.72) MB7.72 ± (7.71 - 7.72) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms195.28 ± (194.57 - 196.00) ms195.40 ± (194.52 - 196.29) ms+0.1%✅⬆️
process.time_to_main_ms465.37 ± (464.73 - 466.01) ms467.15 ± (466.36 - 467.95) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.27 ± (36.23 - 36.31) MB36.27 ± (36.22 - 36.33) MB+0.0%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.0%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration206.87 ± (207.76 - 210.24) ms206.27 ± (206.58 - 208.43) ms-0.3%
.NET Framework 4.8 - Bailout
duration209.37 ± (209.61 - 211.27) ms215.23 ± (215.34 - 218.14) ms+2.8%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1217.42 ± (1215.54 - 1224.88) ms1203.11 ± (1201.78 - 1210.95) ms-1.2%
.NET Core 3.1 - Baseline
process.internal_duration_ms210.38 ± (209.00 - 211.76) ms205.14 ± (203.96 - 206.32) ms-2.5%
process.time_to_main_ms88.66 ± (88.09 - 89.24) ms87.29 ± (86.81 - 87.77) ms-1.5%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.01 ± (15.99 - 16.03) MB15.91 ± (15.89 - 15.93) MB-0.6%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.4%
.NET Core 3.1 - Bailout
process.internal_duration_ms205.29 ± (204.06 - 206.51) ms201.91 ± (200.58 - 203.25) ms-1.6%
process.time_to_main_ms87.63 ± (87.28 - 87.97) ms87.55 ± (87.15 - 87.95) ms-0.1%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.12 ± (16.10 - 16.13) MB15.92 ± (15.90 - 15.94) MB-1.2%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.5%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms450.82 ± (447.17 - 454.46) ms446.32 ± (442.41 - 450.22) ms-1.0%
process.time_to_main_ms508.36 ± (506.14 - 510.58) ms507.23 ± (505.35 - 509.10) ms-0.2%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.76 ± (57.61 - 57.90) MB57.88 ± (57.74 - 58.01) MB+0.2%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)29 ± (29 - 30)-0.2%
.NET 6 - Baseline
process.internal_duration_ms219.97 ± (218.41 - 221.53) ms210.72 ± (209.46 - 211.98) ms-4.2%
process.time_to_main_ms76.72 ± (76.23 - 77.20) ms75.35 ± (74.99 - 75.71) ms-1.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.15 ± (16.13 - 16.17) MB16.20 ± (16.18 - 16.22) MB+0.3%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.1%
.NET 6 - Bailout
process.internal_duration_ms221.32 ± (219.59 - 223.05) ms204.45 ± (203.48 - 205.43) ms-7.6%
process.time_to_main_ms79.48 ± (79.02 - 79.95) ms74.89 ± (74.62 - 75.17) ms-5.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.16 ± (16.14 - 16.18) MB16.30 ± (16.28 - 16.32) MB+0.9%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 21)20 ± (20 - 20)-1.1%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms469.55 ± (464.43 - 474.68) ms470.77 ± (466.97 - 474.57) ms+0.3%✅⬆️
process.time_to_main_ms477.82 ± (476.26 - 479.38) ms479.56 ± (477.95 - 481.17) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed57.62 ± (57.44 - 57.80) MB57.18 ± (57.05 - 57.32) MB-0.8%
runtime.dotnet.threads.count30 ± (30 - 30)29 ± (29 - 30)-0.8%
.NET 8 - Baseline
process.internal_duration_ms218.79 ± (216.68 - 220.90) ms209.48 ± (207.93 - 211.03) ms-4.3%
process.time_to_main_ms76.68 ± (76.13 - 77.22) ms74.08 ± (73.72 - 74.43) ms-3.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.45 ± (11.42 - 11.47) MB11.58 ± (11.56 - 11.60) MB+1.2%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)18 ± (18 - 18)-1.7%
.NET 8 - Bailout
process.internal_duration_ms216.28 ± (214.63 - 217.93) ms201.96 ± (200.91 - 203.01) ms-6.6%
process.time_to_main_ms77.36 ± (76.89 - 77.84) ms74.08 ± (73.82 - 74.34) ms-4.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.51 ± (11.49 - 11.53) MB11.68 ± (11.66 - 11.69) MB+1.4%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)19 ± (19 - 19)-1.8%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms463.44 ± (455.97 - 470.92) ms465.68 ± (457.76 - 473.61) ms+0.5%✅⬆️
process.time_to_main_ms461.87 ± (460.04 - 463.70) ms466.62 ± (464.84 - 468.40) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed49.51 ± (49.39 - 49.62) MB49.46 ± (49.33 - 49.58) MB-0.1%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.2%✅⬆️
Comparison explanation

Execution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8215) - mean (77ms)  : 75, 79
    master - mean (78ms)  : 76, 80

    section Bailout
    This PR (8215) - mean (81ms)  : 80, 83
    master - mean (83ms)  : 81, 85

    section CallTarget+Inlining+NGEN
    This PR (8215) - mean (1,103ms)  : 1051, 1154
    master - mean (1,101ms)  : 1050, 1153

Loading
FakeDbCommand (.NET Core 3.1)
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8215) - mean (120ms)  : 117, 123
    master - mean (120ms)  : 117, 123

    section Bailout
    This PR (8215) - mean (121ms)  : 118, 124
    master - mean (121ms)  : 119, 124

    section CallTarget+Inlining+NGEN
    This PR (8215) - mean (774ms)  : 706, 842
    master - mean (780ms)  : 716, 844

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8215) - mean (107ms)  : 103, 110
    master - mean (107ms)  : 103, 110

    section Bailout
    This PR (8215) - mean (108ms)  : 105, 110
    master - mean (108ms)  : 105, 110

    section CallTarget+Inlining+NGEN
    This PR (8215) - mean (760ms)  : 679, 841
    master - mean (757ms)  : 683, 831

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8215) - mean (105ms)  : 102, 107
    master - mean (105ms)  : 102, 109

    section Bailout
    This PR (8215) - mean (106ms)  : 104, 108
    master - mean (107ms)  : 104, 109

    section CallTarget+Inlining+NGEN
    This PR (8215) - mean (695ms)  : 675, 714
    master - mean (689ms)  : 666, 713

Loading
HttpMessageHandler (.NET Framework 4.8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8215) - mean (208ms)  : 194, 221
    master - mean (209ms)  : 190, 228

    section Bailout
    This PR (8215) - mean (217ms)  : 196, 238
    master - mean (210ms)  : 199, 222

    section CallTarget+Inlining+NGEN
    This PR (8215) - mean (1,206ms)  : 1141, 1272
    master - mean (1,220ms)  : 1151, 1290

Loading
HttpMessageHandler (.NET Core 3.1)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8215) - mean (305ms)  : 275, 334
    master - mean (311ms)  : 284, 337

    section Bailout
    This PR (8215) - mean (300ms)  : 276, 324
    master - mean (303ms)  : 279, 328

    section CallTarget+Inlining+NGEN
    This PR (8215) - mean (994ms)  : 928, 1060
    master - mean (995ms)  : 918, 1071

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8215) - mean (298ms)  : 273, 323
    master - mean (308ms)  : 279, 336

    section Bailout
    This PR (8215) - mean (289ms)  : 267, 312
    master - mean (312ms)  : 281, 343

    section CallTarget+Inlining+NGEN
    This PR (8215) - mean (983ms)  : 916, 1051
    master - mean (988ms)  : 898, 1077

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8215) - mean (294ms)  : 268, 321
    master - mean (310ms)  : 266, 354

    section Bailout
    This PR (8215) - mean (287ms)  : 267, 307
    master - mean (306ms)  : 275, 336

    section CallTarget+Inlining+NGEN
    This PR (8215) - mean (959ms)  : 818, 1099
    master - mean (959ms)  : 831, 1086

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant