`cf workers logs <worker> --since`: historical logs without a hand-built telemetry query body
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 53/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli
Research direction
Start by reading the existing cf workers commands and cf observability telemetry query entry point to understand how worker selection and telemetry queries are handled. Implement the requested historical-log command and options, then verify it prints the specified event fields, supports the requested filters and output modes, and reports when there are no events and whether observability is enabled.
Written by the indexing model from the issue text.
Description
Version: cf 1.0.0-beta.10
Problem: Reading a Worker's recent logs from the terminal requires building a raw Observability query body by hand:
cf observability telemetry query --view events --body '{"queryId":"adhoc","view":"events","limit":50,"timeframe":{"from":<ms>,"to":<ms>},"parameters":{"filters":[{"key":"$workers.scriptName","operation":"eq","type":"string","value":"<worker>"}]}}'
Leave out queryId and the request fails. Timestamps are epoch milliseconds. The script-name filter key isn't discoverable from --help.
(#68 covers live tail. This issue is about historical logs.)
Request: a convenience command, for example
cf workers logs <worker> --since 15m [--until ...] [--search "text"] [--event-type scheduled|fetch] [--limit 50] [--json]
It would print one line per event (timestamp, event type, outcome, message), with relative time ranges and no hand-made queryId. A useful extra: when there are zero events, say so explicitly and say whether observability is enabled for the Worker.
- Dominant language
- TypeScript
- Stars
- 916
- Forks
- 53
- Avg merge
- 18h 31m
- Merged PRs (30d)
- 172
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudflare/cf
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cloudflare/cf#344 ·
Maintainers usually reply within 1 day
-
upstream
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cloudflare/cf#262 ·
Maintainers usually reply within 1 day
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` templatePossibly taken @jamesopstad claimed this 8 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cloudflare/cf#223 · 2 assignees ·
Maintainers usually reply within 1 day
-
upstream
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cloudflare/cf#179 ·
Maintainers usually reply within 1 day
-
upstream
Difficulty 4/5 3-5 days Newbie friendliness 58/100
cloudflare/cf#347 ·
Maintainers usually reply within 1 day
Similar issues
-
check:passed streams:edit
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area:mcp bug has repro platform:vscode regression
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anthropics/claude-code#103970 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build contextOpenbug javascript
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day