fLaunchFlagPassParentSessionId#

Fully qualified name: carb::launcher::fLaunchFlagPassParentSessionId

Defined in carb/launcher/ILauncher.h

constexpr LauncherFlags carb::launcher::fLaunchFlagPassParentSessionId = 0x00001000#

Flag to indicate that the parent process’ telemetry session ID should be passed to the child process on its command line via the –/telemetry/parentSessionId=<id>’ setting.

This allows the child process to link its telemetry session back to the parent process session. If the parent process does not have a valid session ID (ie: structured logging is not initialized), the argument will not be added. This flag is automatically implied when the child process executable image is kit or kit.exe, or when the executable image is python (or similar) and other --/ style Carbonite settings are present on the command line. This flag is ignored if fLaunchFlagNoPassParentSessionId is also set.

Note

When the /telemetry/parentSessionId setting is passed to the child process, its value will be passed as a string instead of a 64-bit integer. This is done because of a limitation of the ISettings and IDictionary interfaces - they are not able to parse unsigned 64-bit integer values. Parsed values are clamped to INT64_MAX instead of allowing the value to wrap to be negative instead. Passing the value as a string works around this by keeping the value verbatim instead of trying to parse it as an integer. This does however mean that the setting’s value needs to be read as a string and converted to an unsigned integer with something like std::strtoull(). The convenience helper function carb::launcher::getParentSessionId() is also available to retrieve this value as a uint64_t.