Repository navigation
Report Kotlin and Graal runtimes in worker heartbeats - #3123
Open
Quinn-With-Two-Ns wants to merge 2 commits into
Open
Quinn-With-Two-Ns wants to merge 2 commits into
Quinn-With-Two-Ns wants to merge 2 commits into
Conversation
Pin the API submodule to 1dd85fd479 from temporalio/api#880. Keep the API dependency update separate from the SDK runtime reporting changes.
Detect directly registered Kotlin workflow and activity implementations per worker and include the Kotlin version alongside the JVM runtime. Report Graal native-image execution when detected. Keep detection best effort and preserve telemetry opt-out and heartbeat acceptance behavior.
Sushisource
approved these changes
Oct 5, 2026
Sushisource
left a comment
Member
There was a problem hiding this comment.
Do we have any tests that run under graal/kotin that could be integ tests for verifying the detection?
Not a huge deal either way
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
Report Kotlin and Graal runtimes in worker heartbeats — preserve JVM version reporting, add Graal native-image detection, and report Kotlin with its runtime version when a directly registered workflow or activity implementation has Kotlin metadata.
Why?
Report which language runtimes a worker uses alongside its existing JVM environment information. Detection is best effort any failure does not block registration or reporting. Kotlin detection is scoped per worker rather than based on classpath presence. Existing environment-info opt-out and retry-until-accepted behavior are preserved.
Server PR
API dependency: temporalio/api#880. No coordinated server PR is required by the SDK reporting changes; these use the existing worker-heartbeat environment runtime fields.
Validation
./gradlew --offline spotlessApplycompleted.WorkerEnvironmentInfoTestunit tests passed.temporal-kotlintests passed, including six new registration-to-heartbeat tests.WorkerHeartbeat*test invocation completed; 13 existing heartbeat tests were skipped by the default in-memory server configuration.git diff --checkpassed.Note
Low Risk
Telemetry-only additions to worker heartbeats with best-effort detection and existing opt-out; no changes to task execution or public API signatures.
Overview
Worker heartbeats can now include Graal native-image and Kotlin runtimes in the one-shot environment payload, in addition to the existing JVM version.
Graal is detected at client/worker environment probe time via Graal system properties (
org.graalvm.nativeimage.imagecode/org.graalvm.version). Kotlin is added per worker when a directly registered workflow or activity implementation class carrieskotlin.Metadata; the Kotlin version is resolved reflectively from that class’s loader. Detection is best effort—probe failures are isolated so hosting/platform reporting still works—andsetDisableWorkerEnvironmentInfostill suppresses all of this. Kotlin reporting is per worker (not classpath-wide), and the retry-until-accepted / clear-after-accept heartbeat behavior is unchanged.Docs and changelog are updated; unit and
temporal-kotlinintegration tests cover Graal properties, Kotlin augmentation, opt-out, and registration paths.Reviewed by Cursor Bugbot for commit b4ca68f. Bugbot is set up for automated code reviews on this repo. Configure here.