fix(logs): wire up cli telemetry and model user errors#1460
Open
Hweinstock wants to merge 2 commits into
Open
Conversation
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
Contributor
Package TarballHow to installgh release download pr-1460-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.17.0.tgz |
agentcore-cli-automation
approved these changes
Jun 3, 2026
agentcore-cli-automation
left a comment
There was a problem hiding this comment.
Looks good to merge.
Verified:
withCommandRunTelemetrywiring incommand.tsxis consistent with existing usage in other CLI commands (e.g.validate,import,status).LogsAttrs(has_query,has_level_filter) andLogsEvalsAttrs(has_follow) schemas already exist inschemas/command-run.ts, matching the attributes passed in.ValidationErrorextendsBaseErrorwithdefaultSource: 'user', soclassifyErrorwill correctly emitsource: 'user'andcategory: 'ValidationError'for the two now-typed conditions inuseLogsFlow.- CLI path (
handleLogs/handleLogsEval) and TUI path (useLogsFlow) are distinct call sites — no double-counting risk. requireProject()remains outside the telemetry wrapper (unchanged behavior, not a regression).
Hweinstock
commented
Jun 3, 2026
| @@ -31,7 +32,11 @@ export const registerLogs = (program: Command) => { | |||
| requireProject(); | |||
Contributor
Author
There was a problem hiding this comment.
eventually, we'll want this in telemetry, but right now it kills the process on failure, so OOS for here.
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.
Description
Two changes to improve telemetry coverage for the
logscommand:Wire up CLI telemetry (
commands/logs/command.tsx):handleLogsandhandleLogsEvalare now wrapped inwithCommandRunTelemetry. Before this, only the interactive TUI path emittedcli.command_run; the CLI path recorded nothing.Model user errors (
tui/screens/logs/useLogsFlow.ts): Two conditions that returned plainnew Error(...)now returnValidationError.Related Issue
Closes #
Documentation PR
N/A
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.