Production request-time logs aren't reaching the deploy log collector

Đang mở
#51 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
nextjs, typescript
Lĩnh vực
devops, observability

Hướng nghiên cứu

Start with lib/logger.ts, which writes structured JSON to process.stdout.write in production, and compare it with how the Next.js boot output reaches the deploy log. Reproduce by logging from a request handler and checking whether the line appears in railway logs. Done means request-time logger output shows up in the production deploy log stream. The root cause is not yet identified, so confirm it with the maintainers before you start.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

backend bug help wanted

Copied from DeadantCo/answerLoops#41 · originally opened by sethr07 on 2026-11-20

Copied from https://github.com/answerLoops/answerLoops/issues/221 — originally opened by @NathanTarbert on 2026-09-18

What's happening

The production app service's deploy log stream only ever shows container boot output (Next.js startup, migration notices, deprecation warnings). No request-time application logs show up after that — confirmed with railway logs --since 3h --filter "@​level:warn" returning nothing, and the raw unfiltered stream staying at a fixed ~24 lines regardless of time range, even though HTTP network logs (a separate Railway feature) prove the app is actively handling requests minutes and hours later.

Why this matters

Any logger.warn / logger.error / logger.info call from inside a request handler is currently invisible in production. This blocked diagnosis of a separate bug (see the companion Telegram webhook issue) and generally means production incidents can't be debugged from logs right now — only from HTTP status codes and timing.

What's been ruled out

  • The logger itself writes structured JSON to process.stdout.write in production (lib/logger.ts) — same mechanism Next.js's own boot output uses, which does show up.
  • Not a search/filter UI quirk — confirmed via the Railway CLI directly (railway logs), not just the dashboard.

Open question

Why request-time stdout writes aren't reaching the same collector that captures the initial container boot output. Worth checking whether the process is forking/threading in a way that doesn't inherit the parent's stdout, or whether there's output buffering that never flushes under the actual request-serving code path.

Relevant code

  • lib/logger.ts

Start here: new to the project? Read CONTRIBUTING.md first. It covers the ground rules, running answerLoops locally, and how to open a pull request.

Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DeadantCo/answerLoopsdev

Tất cả issue của DeadantCo/answerLoopsdev

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.