Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): surface cloudflared FTL/PNC relay logs as warnings, not debug #5076

Mergedarhxam(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5076/headmerged by maria-rcks View on GitHub

What Changed

classifyRelayClientOutput (apps/server/src/cloud/ManagedEndpointRuntime.ts) now treats the cloudflared FTL and PNC zerolog level tokens as warnings, alongside the existing ERR/WRN. Extended the existing classifier test.

Why

The function classifies relay-connector (cloudflared) output into connected / warning / debug severities. It only matched ERR and WRN, so FTL (fatal) and PNC (panic) — both strictly more severe than ERR — fell through to debug, the quietest level. A fatal connector failure (e.g. FTL Cannot determine default origin certificate path, or a runtime panic that takes T3 Connect down) was therefore logged at debug and effectively hidden exactly when someone is diagnosing why the relay went offline.

Adding FTL/PNC to the warning set makes the most severe relay failures surface at least as loudly as ordinary errors. The added assertions fail before this change and pass after.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • No UI changes

Note

Low Risk Narrow logging-severity tweak in relay output classification with matching unit tests; no auth, data, or runtime behavior changes beyond log visibility.

Overview Relay log classification for cloudflared output now treats zerolog FTL (fatal) and PNC (panic) like ERR/WRN, so those lines are logged via logWarning instead of logDebug.

Before this change, the most severe connector failures (certificate path fatals, runtime panics) were effectively hidden at debug level when diagnosing relay outages. Tests assert FTL and PNC map to warning.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f1add90c145a585fb054a4505be77ec2c01989fc. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Surface cloudflared FTL and PNC relay logs as warnings instead of debug

Expands the regex in classifyRelayClientOutput in ManagedEndpointRuntime.ts from /\b(?:ERR|WRN)\b/u to /\b(?:ERR|WRN|FTL|PNC)\b/u, so zerolog fatal and panic level tokens are treated as warnings rather than debug output.

Macroscope summarized f1add90.
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 9568c31d-a857-4aea-9016-899ebc690b0d

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. Approvability

      Verdict: Approved f1add90

      Simple bug fix that adds FTL (fatal) and PNC (panic) log tokens to the cloudflared output classifier regex, ensuring severe logs surface as warnings instead of being hidden at debug level. The change is minimal, well-tested, and only affects log visibility.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. maria-rcks merged this5192f77

    5. maria-rcks closed this

Sign in to join this conversation.