feat(telemetry): implement app-extended-heartbeat event#5531
feat(telemetry): implement app-extended-heartbeat event#5531gh-worker-dd-mergequeue-cf854d[bot] merged 13 commits intomasterfrom
Conversation
Add support for the app-extended-heartbeat telemetry event per the telemetry v2 API spec. The event fires periodically (default 24h) and includes the full configuration payload, matching app-started. The interval is configurable via DD_TELEMETRY_EXTENDED_HEARTBEAT_INTERVAL (in seconds) to enable system testing with shorter intervals. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Thank you for updating Change log entry section 👏 Visited at: 2026-04-01 14:13:45 UTC |
Typing analysisNote: Ignored files are excluded from the next sections.
|
Add DD_TELEMETRY_EXTENDED_HEARTBEAT_INTERVAL to supported-configurations.json (implementation A, type int, default 86400) to satisfy the EnvStringValidationCop lint check. Add RBS type signature for AppExtendedHeartbeat to pass steep typecheck. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add DD_TELEMETRY_EXTENDED_HEARTBEAT_INTERVAL to the generated SUPPORTED_CONFIGURATION_NAMES set to fix EnvStringValidationCop - Update Worker RBS signature with new constructor param and instance variables for steep typecheck Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add ENV_EXTENDED_HEARTBEAT_INTERVAL to ext.rbs for steep typecheck - Update Worker.new mock in component_spec.rb to include the new extended_heartbeat_interval_seconds parameter Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verify the event type is 'app-extended-heartbeat' and the payload includes the configuration array passed at construction. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: d1ab17a | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
p-datadog
left a comment
There was a problem hiding this comment.
Clean implementation — the tick-counter approach mirrors the existing heartbeat pattern nicely, and the initialize_state placement of @extended_heartbeat_ticks correctly resets the 24h timer after fork.
A couple of things caught my eye below.
Use attr_reader instead of reaching into payload hash to access configuration in the extended heartbeat worker. This avoids coupling to the payload structure and makes the dependency explicit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… attr_reader attr_reader :configuration conflicts with the existing private def configuration(settings, agent_settings) method. Use a separate public method name to avoid Lint/DuplicateMethods and RBS conflicts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
vpellan
left a comment
There was a problem hiding this comment.
Requesting change to include configs changed through remote config.
…ttings Pass settings and agent_settings to the worker so app-extended-heartbeat recomputes the full configuration payload at each firing instead of snapshotting it from app-started, ensuring remote config changes are reflected. Remove the default for extended_heartbeat_interval_seconds from the worker constructor since the config DSL is the single source of truth. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add extended_heartbeat! worker tests: no-op before initial event, fires after configured interval, resets counter and fires repeatedly - Prove freshness in extended heartbeat spec by modifying a setting and verifying the change is reflected in a new event instantiation - Use Datadog::Core::Configuration::Settings.new instead of the global Datadog.configuration to avoid coupling to global state - Fix CI failure: inline worker_class.new in perform spec was missing the new required settings/agent_settings/extended_heartbeat_interval_seconds params - Remove verbose class comment per project minimal-comment style Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
The expected merge time in
|
29f1a36
into
master
Summary
Implement the `app-extended-heartbeat` telemetry event for the Ruby tracer.
Motivation
Long-running services (24h+) currently only report their configuration state via the initial `app-started` event. If the backend misses or loses that event, there's no way to recover visibility into the SDK's configuration. The `app-extended-heartbeat` event solves this by re-sending the full configuration payload every 24h, ensuring reliable state reporting for long-running instances.
Implementation
`AppExtendedHeartbeat` inherits `AppStarted` to reuse its configuration-building logic. Rather than snapshotting configuration at startup, the worker recomputes the full payload fresh at each firing by passing `settings` and `agent_settings` directly — this means remote config changes are correctly reflected in the periodic heartbeat.
The interval is configurable via `DD_TELEMETRY_EXTENDED_HEARTBEAT_INTERVAL` (in seconds) for system test parity validation; the default (86400s) is defined solely in the config DSL. The tick-counter approach mirrors the existing heartbeat pattern and resets correctly after fork via `initialize_state`.
Change log entry
Yes. Add `app-extended-heartbeat` telemetry event emitted every 24h with full configuration payload (including remote config changes) for long-running service visibility.
Related