Skip to content

Comments

DX improvements: tracing instrumentation and k8s fixes#289

Merged
vcarl merged 3 commits intomainfrom
vc-dx
Feb 21, 2026
Merged

DX improvements: tracing instrumentation and k8s fixes#289
vcarl merged 3 commits intomainfrom
vc-dx

Conversation

@vcarl
Copy link
Member

@vcarl vcarl commented Feb 21, 2026

Summary

  • Add granular performance tracing with Effect.withSpan on Discord SDK calls, commands, audit log fetches, and settings queries
  • Add dev-mode span tree exporter that prints human-readable timing trees instead of raw console spans
  • Make Sentry sample rate configurable via SENTRY_TRACES_SAMPLE_RATE env var
  • Fix k8s: Dockerfile uses npm ci --omit=dev, shared wildcard TLS cert for previews, correct PVC cleanup label, PDB allows node drains
  • Make integrity check non-blocking at startup

Test plan

  • Verify Docker build succeeds in CI
  • Confirm smoke test deploys and tears down cleanly (PVC cleanup label fix)
  • Apply cluster/preview/certificate.yaml to cluster before next preview deploy
  • Verify dev-mode span output prints readable trees on local run

🤖 Generated with Claude Code

vcarl and others added 3 commits February 21, 2026 00:16
- Dockerfile: use npm ci --omit=dev instead of copy-all + npm prune
- Add shared wildcard TLS cert for staging previews instead of per-PR certs
- Fix PVC cleanup label selector in cd.yml (was using wrong label)
- Change PDB maxUnavailable from 0 to 1 to stop blocking node drains
- Make integrity check non-blocking by dropping yield* on runFork

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Add spans to all 20 Discord SDK wrappers (discord.fetchGuild, discord.sendMessage, etc.)
- Add top-level command dispatch span (command.<name>) wrapping all interaction handlers
- Add per-attempt child spans to audit log retry loop
- Replace ConsoleSpanExporter with DevTreeSpanExporter for readable timing trees in dev
- Make Sentry tracesSampleRate configurable via SENTRY_TRACES_SAMPLE_RATE env var

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Adds spans to fetchSettingsEffect and constructLog which were missing
instrumentation, and refactors raw Discord API calls in the
alreadyReported branch of userLog.ts to use our instrumented Effect
wrappers (fetchMessage, messageReply, sendMessage) so they appear in
trace trees.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@github-actions
Copy link

Smoke Test Results

Metric Value
Image Size unknown
Startup Time 144s

Tested commit: 3319b72

@vcarl vcarl merged commit 4d8eb99 into main Feb 21, 2026
5 checks passed
@vcarl vcarl deleted the vc-dx branch February 21, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant