Class WorkerEnvironmentInfo

java.lang.Object
io.temporal.internal.worker.WorkerEnvironmentInfo

public final class WorkerEnvironmentInfo extends Object
Detects the runtime, hosting environment, and platform information reported in the first accepted worker heartbeat.
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.temporal.api.worker.v1.EnvironmentInfo
    Best effort: this runs during client creation, and telemetry must not break it.
    static boolean
    isKotlinImplementation(Class<?> implementationClass)
    Detects Kotlin implementation classes without a Kotlin dependency or assuming a shared annotation class loader.
    static io.temporal.api.worker.v1.EnvironmentInfo
    withKotlinRuntime(io.temporal.api.worker.v1.EnvironmentInfo info, Class<?> implementationClass)
    Returns immutable environment information augmented with Kotlin when the implementation has Kotlin metadata.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • detect

      public static io.temporal.api.worker.v1.EnvironmentInfo detect()
      Best effort: this runs during client creation, and telemetry must not break it. Each probe is isolated so unavailable runtime information does not prevent platform or hosting detection.
    • isKotlinImplementation

      public static boolean isKotlinImplementation(@Nullable Class<?> implementationClass)
      Detects Kotlin implementation classes without a Kotlin dependency or assuming a shared annotation class loader.
    • withKotlinRuntime

      @Nullable public static io.temporal.api.worker.v1.EnvironmentInfo withKotlinRuntime(@Nullable io.temporal.api.worker.v1.EnvironmentInfo info, @Nullable Class<?> implementationClass)
      Returns immutable environment information augmented with Kotlin when the implementation has Kotlin metadata. A null environment (telemetry opt-out) is preserved, as are existing runtimes.