Skip to content

feat: enable CloudWatch Transaction Search on deploy#512

Open
jesseturner21 wants to merge 9 commits intomainfrom
feat/enable-transaction-search-on-deploy
Open

feat: enable CloudWatch Transaction Search on deploy#512
jesseturner21 wants to merge 9 commits intomainfrom
feat/enable-transaction-search-on-deploy

Conversation

@jesseturner21
Copy link
Contributor

Description

After a successful deploy with agents, the CLI automatically enables CloudWatch Transaction Search in the target region. This sets up the full observability pipeline: Application Signals discovery, CloudWatch Logs resource policy for X-Ray, trace segment destination to CloudWatchLogs, and configurable indexing percentage (default 100%).

All operations are idempotent and safe to run on every deploy. The setup is non-blocking — failures are logged as warnings and never fail the deploy.

Configuration via ~/.agentcore/config.json:

  • Opt out entirely: { "disableTransactionSearch": true }
  • Custom indexing percentage: { "transactionSearchIndexingPercentage": 50 }

Changes

  • New: src/cli/aws/transaction-search.ts — AWS client wrapper for Application Signals StartDiscovery, CloudWatch Logs resource policy, X-Ray trace destination, and indexing rule configuration
  • New: src/cli/operations/deploy/post-deploy-observability.ts — orchestration for the post-deploy transaction search setup with config-based opt-out and indexing percentage
  • New: src/cli/aws/__tests__/transaction-search.test.ts — unit tests for enableTransactionSearch
  • New: src/cli/operations/deploy/__tests__/post-deploy-observability.test.ts — unit tests for setupTransactionSearch
  • Modified: src/cli/commands/deploy/actions.ts — integrated post-deploy step (CLI path)
  • Modified: src/cli/tui/screens/deploy/useDeployFlow.ts — integrated post-deploy step (TUI path)
  • Modified: src/lib/schemas/io/cli-config.ts — added disableTransactionSearch and transactionSearchIndexingPercentage config options
  • Modified: package.json — added @aws-sdk/client-application-signals and @aws-sdk/client-xray

Related Issue

Closes #

Documentation PR

N/A

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

E2E verified on account 252624323091 (us-west-2): full deploy with Strands agent confirmed all four Transaction Search components enabled (Application Signals, resource policy, CloudWatchLogs destination, 100% indexing).

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.

jesseturner21 and others added 8 commits March 6, 2026 13:43
After a successful deploy with agents, the CLI now checks if CloudWatch
Application Signals (which powers Transaction Search) is enabled and
auto-enables it via StartDiscovery when --yes is passed. A console URL
is added to the next-steps output so users can view traces immediately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Enable transaction search silently on every deploy (no confirmation needed)
- Full setup: Application Signals, CW Logs resource policy, CloudWatchLogs
  destination, 100% indexing
- All operations are idempotent
- Add opt-out via ~/.agentcore/config.json: { "disableTransactionSearch": true }
- Remove visible deploy step — runs silently, warnings logged if setup fails

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…l rules

The Default rule always exists — no need to list and loop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…pt true

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The trace link is already shown after invoke where it's actually useful.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jesseturner21 jesseturner21 requested a review from a team March 6, 2026 21:47
@github-actions github-actions bot added the size/l PR size: L label Mar 6, 2026
… transaction-search

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot removed the size/l PR size: L label Mar 6, 2026
@github-actions github-actions bot added the size/l PR size: L label Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant