feat: add project aware observability support for harness - #2275
feat: add project aware observability support for harness#2275nborges-aws wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
The change cleanly mirrors the existing project log runtime / project traces runtime handlers for Harness, with the added step of resolving the managed Runtime via core.harness.resolveRuntime before hitting CloudWatch. Wiring, flags, log‑group construction (runtimeLogGroup(runtime.runtimeId, qualifier ?? DEFAULT)), region propagation from the resolved target, and README updates all look correct. Tests use temp dirs rather than fs mocks and only stub the true I/O boundaries (TestCoreClient), which matches the pattern used elsewhere.
One optional follow-up — not blocking:
src/handlers/project/log/harness.test.tsxandsrc/handlers/project/traces/harness.test.tsxdon't cover the "multiple Harnesses without--name" or "Harness not deployed to target" error paths that the runtime peers (runtime.test.tsx) do. The shared code (selectProjectResource,resolveDeployedResource) is exercised by the runtime tests, but adding the parallel harness cases would guard against future divergence and confirm theHarnesslabel appears correctly in the error messages.
No serious issues; nothing else to change before merge.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## project-traces #2275 +/- ##
================================================
Coverage 96.93% 96.93%
================================================
Files 569 571 +2
Lines 39287 39395 +108
================================================
+ Hits 38083 38188 +105
- Misses 1204 1207 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Adds project-aware logs and traces for Harness resources
These commands resolve the project Harness through the selected target, then resolve its managed runtime before querying cloudwatch for requested records. They reuse the existing shared observability handlers and preserve the imperative harness commands.
Type of Change
Testing
How have you tested the change?
Manual testing, plus added tests covering project harness -> runtime resolution for logs, named target and qualifier selection for
trace list, and trace downloads through the project route.bun run test(3177 pass, 0 fail)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.
Stack created with GitHub Stacks CLI • Give Feedback 💬