-
Notifications
You must be signed in to change notification settings - Fork 61
Add telemetry output splitting support for large process logs #582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nchapagain001
merged 19 commits into
main
from
users/nchapagain/splittingStandardStreams
Dec 13, 2025
Merged
Add telemetry output splitting support for large process logs #582
nchapagain001
merged 19 commits into
main
from
users/nchapagain/splittingStandardStreams
Dec 13, 2025
+406
−12
Conversation
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
RakeshwarK
approved these changes
Dec 12, 2025
brdeyo
reviewed
Dec 12, 2025
src/VirtualClient/VirtualClient.Core/VirtualClientLoggingExtensions.cs
Outdated
Show resolved
Hide resolved
brdeyo
reviewed
Dec 12, 2025
src/VirtualClient/VirtualClient.Core/VirtualClientLoggingExtensions.cs
Outdated
Show resolved
Hide resolved
brdeyo
reviewed
Dec 12, 2025
src/VirtualClient/VirtualClient.Core/VirtualClientLoggingExtensions.cs
Outdated
Show resolved
Hide resolved
brdeyo
reviewed
Dec 12, 2025
src/VirtualClient/VirtualClient.Monitors/ExecuteCommandMonitor.cs
Outdated
Show resolved
Hide resolved
Signed-off-by: Nirjan <165215502+nchapagain001@users.noreply.github.com>
…ithub.com/microsoft/VirtualClient into users/nchapagain/splittingStandardStreams
brdeyo
approved these changes
Dec 13, 2025
brdeyo
approved these changes
Dec 13, 2025
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.
This PR adds new default behavior in Virtual Client. Virtual Client will split its output for process telemetry logging to handle cases where standard output and standard error exceed Event Hub’s 1 MB message size limit.
Background
Event Hub enforces a 1 MB limit on telemetry events. Previously, when process outputs exceeded the configured character threshold (default 125,000 chars), Virtual Client would truncate the data, resulting in incomplete logs that made debugging/reporting difficult.
Changes
• Added a default behavior to split StandardOutput and StandardError in VirtualClientLoggingExtensions.LogProcessDetails.
• When StandardOutput and StandardError does not exceed maxchar threshold (125000), it will output everything in a single event.
• When StandardOutput and StandardError's combined length exceed maxchar threshold (125000),
• StandardOutput will split into multiple chunked telemetry events instead of being truncated.
• StandardError will split into multiple chunked telemetry events instead of being truncated.
• Each chunk is emitted as its own *.ProcessDetails event.
• Each event still carries the same OperationId/ExperimentId so chunks can be reassembled downstream.
Reconstructing chunked output in KQL
If you enable TelemetrySplit and want to reconstruct the original StandardOutput from chunked telemetry, the following Kusto query shows a way to do that:
Notes:
• standardOutputChunkPart is only present on chunked events; for non-chunked events, the existing single-event behavior remains unchanged.
• A similar pattern can be used for StandardError with standardErrorChunkPart if needed.