Tag HSM outbound Nexus call failure logs - #11662
Open
stephanos wants to merge 8 commits into
Open
Conversation
stephanos
commented
Aug 20, 2026
| Links: []nexus.Link{args.nexusLink}, | ||
| } | ||
|
|
||
| traceCtx := invocationTraceContext{ |
Contributor
Author
There was a problem hiding this comment.
This entire change mimics CHASM's
Contributor
|
Claude finished @stephanos's task in 2m 46s —— View job Reviewed 1 file, 1 finding. |
stephanos
commented
Aug 20, 2026
| if failureSource == commonnexus.FailureSourceWorker || isTimeoutBelowMin { | ||
| e.Logger.Debug(msg, tags...) | ||
| } else { | ||
| e.Logger.Error(msg, tags...) |
Contributor
Author
There was a problem hiding this comment.
This is the main fix
stephanos
commented
Aug 20, 2026
| return []tag.Tag{ | ||
| tag.Operation(c.operationTag), | ||
| tag.WorkflowNamespace(c.namespaceName), | ||
| tag.NexusEndpointTargetNamespaceID(c.targetNamespaceID), |
Contributor
Author
There was a problem hiding this comment.
This is a net new tag.
The HSM Nexus executor logged outbound call failures with tag.Error alone, while the CHASM implementation logs ten structured tags for the same failure. During the HSM->CHASM migration a namespace runs both implementations at once, so a log query written against the CHASM tags silently returns only that half of the traffic while looking complete. Extract the tag list the HTTP trace logger already builds and reuse it for the failure logs, mirroring chasm/lib/nexusoperation's invocationTraceContext.tags(). Both the start and cancel paths now share one construction, and the debug/error level split moves into a helper. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CHASM's invocationTraceContext.tags() emits ten tags; the HSM version was missing nexus-endpoint-target-namespace-id, which defeats the point of mirroring it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Holding a reusable []tag.Tag and appending the error onto it tripped gocritic's appendAssign, which was silenced with a nolint. The warning is about a real aliasing class: append into a slice with spare capacity writes through the shared array. Binding the logger once with log.With removes the slice, so there is nothing to alias and no nolint needed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Replace the ad-hoc tag helper with the same struct, tags() method and logCallFailure that chasm/lib/nexusoperation uses, so the two implementations stay in step. Deriving tags lazily also removes the aliasing hazard that needed a gocritic nolint, and avoids building them at all when nothing is logged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
logCallFailure fires from the same block in both executors where the outcome tags are computed, so reading order now follows call order. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
stephanos
force-pushed
the
stephanos/nexus-obs-hsm-log-tags
branch
from
August 20, 2026 18:45
af5ea9b to
49f8854
Compare
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
The HSM Nexus executor logged outbound call failure logs were missing tags.
Why
chasm/lib/nexusoperationalready logs exactly these fields viainvocationTraceContext.tags(),