-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
TASK: Add correlation id and debug metadata to events #5451
Merged
mhsdesign
merged 12 commits into
neos:9.0
from
mhsdesign:task/add-debug-metadata-to-events
Jan 28, 2025
Merged
TASK: Add correlation id and debug metadata to events #5451
mhsdesign
merged 12 commits into
neos:9.0
from
mhsdesign:task/add-debug-metadata-to-events
Jan 28, 2025
Conversation
This file contains 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
6 tasks
correlation seems good, I think the rest is from the other PRs.... |
…events Applies suggestion originally posted in neos#4969 (comment) the resulting event log would be similar to: | event | correlation id | metadata | |---------------------------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------| | NodeAggregateWithNodeWasCreated | 123456 | `{structureAdjustment: 'Content Stream: %s; Dimension Space Point: %s, Node Aggregate: %s --- The tethered child node "bar" is missing.'}` | | NodePropertiesWereSet | 123456 | |
…ng the exception message) While before neos#4965 a even `WorkspaceRebaseFailed` would contain bloats of data which grew a lot. A small message in the closed even is not a problem though.
The refactored publishing V3 opens another now used advantage: For commands with multiple events like workspace publishing, we can now centrally add metadata like a simple correlation id. Note that for 'simple' commands we dont need to do this as `RebaseableCommand::enrichWithCommand` will already group them with a causationId which is what we decided to use for tethered nodes for example. The id never changes for causation ids.
…ration to first event For commands with multiple events like workspace publishing, we can now add to the event metadata like the causation command short class name. Via the correlation id they are grouped so we only add this information to the first event, Note that for 'simple' commands we dont need to do this as `RebaseableCommand::enrichWithCommand` will actually fully serialize the command into commandName and payload
... instead of encoding the command into `debug_causationCommand`
mhsdesign
force-pushed
the
task/add-debug-metadata-to-events
branch
from
January 27, 2025 15:09
a40ba9f
to
c522ffe
Compare
mhsdesign
changed the title
TASK: Add debug metadata to events
TASK: Add correlation id and debug metadata to events
Jan 27, 2025
kitsunet
approved these changes
Jan 27, 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.
Resolves first iteration of #3887
Resolves: #4758
Debug information for events from publishing & co
The refactored publishing V3 opens another now used advantage we can now centrally add metadata like a simple correlation id. This is especially helpful to determine a publish sequence in the event log.
Also for special events like
ContentStreamWasForked
ContentStreamWasReopened
we add additional debug information viadebug_reason
.Debug information for events from structure adjustments
As discussed in #4969 (comment), we group all events emitted by a structure adjustment via a common correlation id and additionally add to the metadata the rendered message of why the structure adjustment was necessary.
{debug_reason: 'Content Stream: %s; Dimension Space Point: %s, Node Aggregate: %s --- The tethered child node "bar" is missing.'}
Upgrade instructions
Review instructions
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions