feat: instrument telemetry for import command#1312
Merged
Conversation
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
Contributor
Package TarballHow to installgh release download pr-1312-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.14.0.tgz |
Wrap all import execution paths with withCommandRunTelemetry: - YAML flow (import --source) - 5 subcommands (runtime, memory, evaluator, online-eval, gateway) - TUI ImportProgressScreen (deploy pattern) Schema changes: - Register import.evaluator, import.online-eval, import.gateway as NoAttrs Error typing: - Use ValidationError for ARN/target/config validation in import-utils.ts - Use NoProjectError for missing project in resolveProjectContext - Use ValidationError for returned errors in actions.ts Tests: - Schema parse tests for all 6 import command entries - Integration tests verifying telemetry emission on failure paths - Fix pre-existing mock gap in import-gateway-flow.test.ts
c92b29c to
6879a3a
Compare
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
agentcore-cli-automation
left a comment
There was a problem hiding this comment.
Telemetry instrumentation looks solid and follows the established patterns from the invoke/dev PRs. The error typing changes (ValidationError / NoProjectError) match the classification model well. A couple of small things to consider before merging — neither is a strict blocker.
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
jesseturner21
previously approved these changes
May 19, 2026
Contributor
jesseturner21
left a comment
There was a problem hiding this comment.
LGTM one comment on typing but its not that deep
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
jesseturner21
approved these changes
May 19, 2026
15 tasks
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
Instrument telemetry for all import command execution paths, following the patterns established by the invoke (#1227) and dev (#1223) telemetry PRs.
Telemetry wrapping:
import --source) — wrapped withwithCommandRunTelemetryincommand.ts.action()wrappedImportProgressScreen— wrapped insideuseEffect(deploy pattern, captures success/failure)Schema changes:
import.evaluator,import.online-eval,import.gatewayasNoAttrsentries inCOMMAND_SCHEMASError typing:
import-utils.ts:ValidationErrorfor ARN/target/config validation,NoProjectErrorfor missing projectactions.ts:ValidationErrorfor returned error resultstoError(err)catch-all for SDK errors (correct classification viaBaseError.errorSource)Related Issue
Closes #
Documentation PR
N/A — internal telemetry, no user-facing documentation changes.
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.