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
Copy link
Copy Markdown
Contributor

@Hweinstock Hweinstock commented May 19, 2026

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-actions github-actions Bot added size/m PR size: M agentcore-harness-reviewing AgentCore Harness review in progress labels May 19, 2026
@agentcore-devx-automation agentcore-devx-automation Bot 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-automation agentcore-devx-automation Bot 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 Hweinstock force-pushed the feat/import-telemetry branch from c92b29c to 6879a3a Compare May 19, 2026 20:55
@github-actions github-actions Bot removed the size/m PR size: M label May 19, 2026
@github-actions github-actions Bot added the size/m PR size: M label May 19, 2026
@agentcore-devx-automation agentcore-devx-automation Bot 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-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label May 19, 2026
Copy link
Copy Markdown

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

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 thread src/cli/tui/screens/import/utils.ts Outdated
Comment thread integ-tests/import.test.ts
@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label May 19, 2026
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels May 19, 2026
@agentcore-devx-automation agentcore-devx-automation Bot 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-automation agentcore-devx-automation Bot 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 team May 19, 2026 21:33
jesseturner21
jesseturner21 previously approved these changes May 19, 2026
Copy link
Copy Markdown
Contributor

@jesseturner21 jesseturner21 left a comment

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 thread src/cli/commands/import/actions.ts Outdated
Comment thread src/cli/tui/screens/import/types.ts
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels May 19, 2026
@agentcore-devx-automation agentcore-devx-automation Bot 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-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label May 19, 2026
@Hweinstock Hweinstock merged commit 2cc0a4c into aws:main May 19, 2026
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants