feat: adds data on action kind and queue length to logs #266
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 was the problem/requirement? (What/Why)
When looking at Agent Logs it is useful to know:
What was the solution? (How)
This adds:
It also adds a warning message to the start of the Agent log to inform the customer about the expectations that they can have about log contents and formatting. This was added because not all customers will see the README on the GitHub repository.
What is the impact of this change?
More useful data in the agent logs, and a message to clearly set customer expectations with respect to the log contents and format.
How was this change tested?
I've run the agent with the changes in place, and updated tests. Moreover, the way in which the change was made relied upon tooling to reduce risk:
SessionActionLogEvent
is a required keyword argument, so the linter picks up on every place that a required change is missed.kind
toSessionLogEvent
is only applicable to two subtypes, and each of those subtypes only occurs once in the codebase (outside of tests). This made is easy to do a global search to find all instances and be confident that none were missed.Was this change documented?
Yes, the README has been updated.
Is this a breaking change?
No, it is strictly additive to structured logs, and we do not consider changes to the unstructured logs to be breaking.