Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore(preview): add web/worker log commands to the preview PR comment (#15127)

Max Deichmann11cebc62efe0
diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml
index a878091541..c932063c98 100644
--- a/.github/workflows/preview-build.yml
+++ b/.github/workflows/preview-build.yml
@@ -70,6 +70,10 @@ jobs:
echo "web_image=${WEB_REPO}:${image_tag}"
echo "worker_image=${WORKER_REPO}:${image_tag}"
echo "preview_host=pr-${PR_NUMBER}.${DOMAIN_NAME}"
+ # k8s namespace/release for this PR (web+worker deploys are
+ # <namespace>-web / <namespace>-worker) — used for the log commands
+ # in the "ready" comment below.
+ echo "namespace=langfuse-pr-${PR_NUMBER}"
# Shared, intentionally-public seed login + API keys (synthetic data
# only) — must match the LANGFUSE_INIT_* values in the preview chart
# (k8s/preview/chart/values.yaml). Each preview is its own isolated
@@ -168,6 +172,14 @@ jobs:
**API keys:** `${{ steps.meta.outputs.public_key }}` / `${{ steps.meta.outputs.secret_key }}`
**Commit:** ${{ steps.meta.outputs.commit_sha }}
+ **Logs** (needs preview-cluster `kubectl` access):
+ ```sh
+ kubectl -n ${{ steps.meta.outputs.namespace }} logs -f deploy/${{ steps.meta.outputs.namespace }}-web # web
+ kubectl -n ${{ steps.meta.outputs.namespace }} logs -f deploy/${{ steps.meta.outputs.namespace }}-worker # worker
+ ```
+ Add `--previous` for a crashed container, `--tail=200` to limit, or
+ `kubectl -n ${{ steps.meta.outputs.namespace }} get pods` to inspect status.
+
Synthetic preview data only. Never add production data to public accounts.
- name: Report failure