Skip to content

feat: instrument telemetry for import command - #1312

Merged
Hweinstock merged 4 commits into
aws:mainfrom
Hweinstock:feat/import-telemetry
May 19, 2026
Merged

feat: instrument telemetry for import command#1312
Hweinstock merged 4 commits into
aws:mainfrom
Hweinstock:feat/import-telemetry

Conversation

@Hweinstock

@HweinstockHweinstock commented May 19, 2026

Copy link
Copy Markdown
Contributor

Description

Instrument telemetry for all import command execution paths, following the patterns established by the invoke (#1227) and dev (#1223) telemetry PRs.

Telemetry wrapping:

  • YAML flow (import --source) — wrapped with withCommandRunTelemetry in command.ts
  • 5 subcommands (runtime, memory, evaluator, online-eval, gateway) — each .action() wrapped
  • TUI ImportProgressScreen — wrapped inside useEffect (deploy pattern, captures success/failure)

Schema changes:

  • Register import.evaluator, import.online-eval, import.gateway as NoAttrs entries in COMMAND_SCHEMAS

Error typing:

  • import-utils.ts: ValidationError for ARN/target/config validation, NoProjectError for missing project
  • actions.ts: ValidationError for returned error results
  • Preserves toError(err) catch-all for SDK errors (correct classification via BaseError.errorSource)

Related Issue

Closes #

Documentation PR

N/A — internal telemetry, no user-facing documentation changes.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@github-actionsgithub-actionsBot added size/m PR size: M agentcore-harness-reviewing AgentCore Harness review in progress labels May 19, 2026
@agentcore-devx-automationagentcore-devx-automationBot added the claude-security-reviewing Claude Code /security-review in progress label May 19, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automationagentcore-devx-automationBot removed the claude-security-reviewing Claude Code /security-review in progress label May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.14.0.tgz

How to install

gh 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
@Hweinstock
Hweinstockforce-pushed the feat/import-telemetry branch from c92b29c to 6879a3aCompareMay 19, 2026 20:55
@github-actionsgithub-actionsBot removed the size/m PR size: M label May 19, 2026
@github-actionsgithub-actionsBot added the size/m PR size: M label May 19, 2026
@agentcore-devx-automationagentcore-devx-automationBot added the claude-security-reviewing Claude Code /security-review in progress label May 19, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automationagentcore-devx-automationBot removed the claude-security-reviewing Claude Code /security-review in progress label May 19, 2026

@agentcore-cli-automationagentcore-cli-automation left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment threadsrc/cli/tui/screens/import/utils.ts Outdated
Comment threadinteg-tests/import.test.ts
@github-actionsgithub-actionsBot removed the agentcore-harness-reviewing AgentCore Harness review in progress label May 19, 2026
@github-actionsgithub-actionsBot added size/m PR size: M and removed size/m PR size: M labels May 19, 2026
@agentcore-devx-automationagentcore-devx-automationBot added the claude-security-reviewing Claude Code /security-review in progress label May 19, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automationagentcore-devx-automationBot removed the claude-security-reviewing Claude Code /security-review in progress label May 19, 2026
@Hweinstock
Hweinstock marked this pull request as ready for review May 19, 2026 21:33
@Hweinstock
Hweinstock requested a review from a teamMay 19, 2026 21:33
jesseturner21
jesseturner21 previously approved these changes May 19, 2026

@jesseturner21jesseturner21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM one comment on typing but its not that deep

Comment threadsrc/cli/commands/import/actions.ts Outdated
Comment threadsrc/cli/tui/screens/import/types.ts
@github-actionsgithub-actionsBot added size/m PR size: M and removed size/m PR size: M labels May 19, 2026
@agentcore-devx-automationagentcore-devx-automationBot added the claude-security-reviewing Claude Code /security-review in progress label May 19, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automationagentcore-devx-automationBot removed the claude-security-reviewing Claude Code /security-review in progress label May 19, 2026
@Hweinstock
Hweinstock merged commit 2cc0a4c into aws:mainMay 19, 2026
26 of 28 checks passed
@Hweinstock
Hweinstock deleted the feat/import-telemetry branch July 13, 2026 13:03
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/mPR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Hweinstock@jesseturner21@agentcore-cli-automation