Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ agentcore # interactive TUI
│ │ └── harness # use the existing Harness invoke experience
│ ├── status # inspect deployed project resources (TUI when run bare)
│ └── build # synthesize the project's CloudFormation templates
│ └── log
│ └── runtime # resolve a project Runtime and inspect its logs
└── config # read/write global config values
```

Expand Down Expand Up @@ -186,6 +188,22 @@ agentcore project invoke harness \
Use `--target` to select a deployment target. When a project declares exactly
one resource of the requested type, `--name` may be omitted.

### Inspect project Runtime logs

Project logging resolves a logical Runtime name through the selected deployment
target, so the Runtime ID and deployment region do not need to be
supplied:

```bash
agentcore project log runtime
agentcore project log runtime --name checkout --target production
agentcore project log runtime --name checkout --since 1h --level error
```

When the project declares exactly one Runtime, `--name` may be omitted. Use the
imperative `agentcore runtime logs --id <runtimeId>` command when addressing a
Runtime directly or working outside a project.

### Examples

```bash
Expand Down Expand Up @@ -251,7 +269,7 @@ agentcore runtime version list --id <runtimeId> --max-results 20
agentcore runtime endpoint get --id <runtimeId> --qualifier DEFAULT
agentcore runtime endpoint list --id <runtimeId> --max-results 20

# Follow a Runtime's logs live (Ctrl+C to stop); inside a project --id is optional
# Follow a Runtime's logs live by resource ID (Ctrl+C to stop)
agentcore runtime logs --id <runtimeId>
agentcore runtime logs --id <runtimeId> --level error --query "database"

Expand Down
4 changes: 2 additions & 2 deletions src/core/eval.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ import {
runtimeLogGroup,
sanitizeQueryValue,
type InsightsRowLimit,
} from "./observability";
import { CloudWatchClient } from "./observability/index";
CloudWatchClient,
} from "./observability/index";
import type {
BatchEvaluationDetail,
CodeBasedUpdate,
Expand Down
13 changes: 2 additions & 11 deletions src/core/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import { HarnessClient } from "./harness";
import { IdentityClient } from "./identity";
import { MemoryClient } from "./memory";
import { PolicyClient } from "./policy";
import { ObservabilityClient } from "./observability";
import { CloudWatchClient } from "./observability/index";
import { CloudWatchClient, ObservabilityClient } from "./observability/index";
import { RuntimeClient } from "./runtime";
import type { OpenRuntimeShell } from "./runtime";
import { FsReadWriteJson } from "../io";
import type {
AwsClients,
AwsCredentials,
Expand Down Expand Up @@ -113,14 +111,7 @@ export class CoreClient implements AwsClients {
cloudWatch,
);

// Observability resolves a project's deployed runtime from its stack
// outputs, so it reads aws-targets.json through the same JSON layer the
// project manager uses.
this.observability = new ObservabilityClient(cloudWatch, {
readJson: new FsReadWriteJson({
logger: this.logger.child({ module: "observability" }),
}),
});
this.observability = new ObservabilityClient(cloudWatch);

this.projectManager = new FsProjectManager({
logger: this.logger.child({ module: "projectManager" }),
Expand Down
Loading
Loading