Add typing for Remote::Dispatcher and Telemetry Worker/Events#5451
Add typing for Remote::Dispatcher and Telemetry Worker/Events#5451
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Typing analysisNote: Ignored files are excluded from the next sections. Untyped methodsThis PR clears 2 untyped methods and 1 partially typed method. It increases the percentage of typed methods from 61.14% to 61.29% (+0.15%). Untyped methods (+0-2)✅ Cleared:Partially typed methods (+0-1)✅ Cleared: |
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 93d2911 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
BenchmarksBenchmark execution time: 2026-03-13 20:09:43 Comparing candidate commit 93d2911 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 0 unstable metrics.
|
What does this PR do?
Removes
untypedfromRemote::Dispatcher,Telemetry::Worker, andTelemetry::Event::AppDependenciesLoaded.Motivation:
Replaces
untypedwith precise types determined from the source.Change log entry
None.
Additional Notes:
Remote::Dispatcher#dispatch:-> untyped→-> void(method callsreceivers.eachfor its side effect; return is unused by callers).Telemetry::Event::AppDependenciesLoaded#payload:{ dependencies: untyped }→{ dependencies: Array[Hash[Symbol, String]] }(matches the typeddependenciesprivate method already in the sig).Telemetry::Worker#buffer_klass:-> untyped→-> singleton(Core::Buffer::Random)(returns eitherCRubyorThreadSafe, both subclasses ofRandom; this lets Steep verify.new(@buffer_size)call).SynthAppClientConfigurationChange#payloadfields left asuntyped— they delegate to complex AppStarted payload structure.How to test the change?
bundle exec steep check lib/datadog/core/remote/dispatcher.rb lib/datadog/core/telemetry/event/app_dependencies_loaded.rb lib/datadog/core/telemetry/worker.rb