feat: OpenTelemetry LGTM observability, dev tooling, and memoir UX fixes (#31)
* add staging ios app build script * feat(api): add OpenTelemetry LGTM stack for local observability Wire OTel traces, metrics, and logs through a collector to Tempo, Prometheus, and Loki, with custom LLM instrumentation, dev compose overlay, Grafana provisioning, env templates, and development.sh auto-start. Co-authored-by: Cursor <cursoragent@cursor.com> * feat: expand observability, harden dev tooling, and fix expo staging UX Add business and LLM Prometheus metrics with Grafana dashboards, alerting, and a metrics verification script. Wire telemetry through adapters and core LLM paths, and document the local LGTM workflow. Fix development.sh for macOS bash 3.2, open Grafana and eval-web in Chrome, and repair eval-web auto-open (unbound EVAL_WEB_BROWSER_SCHEDULED). Merge internal-eval into the main dev script with improved compose handling. Require EXPO_PUBLIC_* at build time, improve iOS HTTP ATS for staging IPs, show memoir empty state instead of load errors when no chapters exist, and add jest env setup plus chapter list response normalization. Co-authored-by: Cursor <cursoragent@cursor.com> * chore: enable Grafana Assistant Cursor plugin Co-authored-by: Cursor <cursoragent@cursor.com> * fix: memoir empty state and repair withdrawn 0020_chapters_book_id stamp Show empty memoir UI when the chapter list succeeds with no items; treat auth/404 as non-fatal. Extend alembic revision repair so local dev DBs stamped with the removed 0020_chapters_book_id migration can roll back and upgrade to 0019. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Kevin <kevin@brighteng.org> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
14
.github/workflows/app-expo-deploy.yml
vendored
14
.github/workflows/app-expo-deploy.yml
vendored
@@ -8,12 +8,12 @@
|
||||
# - 若需用 x86 模拟器验证此 APK,需改回含 x86 的 ABI 或另建 job。
|
||||
#
|
||||
# 环境映射(与后端 api 一致:main → 预发 staging,tag → 生产 production):
|
||||
# push main → stage → node scripts/use-env.js staging → .env.staging
|
||||
# push v*.*.* → prod → node scripts/use-env.js production → .env.production
|
||||
# push main → stage → node scripts/use-env.js staging → env/staging → .env
|
||||
# push v*.*.* → prod → node scripts/use-env.js production → env/production → .env
|
||||
#
|
||||
# 手动触发 workflow_dispatch:
|
||||
# - dev:内部测试包,使用 .env.development
|
||||
# - stage:仅用于 main / master 补跑 Staging release,使用 .env.staging
|
||||
# - dev:内部测试包,使用 env/development
|
||||
# - stage:仅用于 main / master 补跑 Staging release,使用 env/staging
|
||||
# - prod:用于 vMAJOR.MINOR.PATCH tag,或在 main / master 上填写 version 后发正式 Release
|
||||
#
|
||||
# Repository secrets(与 android-release.yml 共用同一套即可):
|
||||
@@ -140,6 +140,12 @@ jobs:
|
||||
stage) node scripts/use-env.js staging ;;
|
||||
*) node scripts/use-env.js development ;;
|
||||
esac
|
||||
for legacy in .env.production .env.staging .env.development; do
|
||||
if [ -f "$legacy" ]; then
|
||||
echo "::error::Legacy $legacy must not exist at app-expo root (overrides .env on Release builds)."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Determine version
|
||||
id: version
|
||||
|
||||
Reference in New Issue
Block a user