ops: correct prod OpenTelemetry endpoint and ALLOWED_HOSTS in taskflow-deploy
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- csharp, docker-compose
- 领域
- devops, infrastructure
调研方向
In the live docker-compose.yml in nevridge/taskflow-deploy, compare the taskflow-api and taskflow-web environment settings with TaskFlow.Api/Extensions/OpenTelemetryServiceExtensions.cs and TaskFlow.Web/vite.preview.config.js. Apply the specified endpoint and host-setting changes in one deploy-repo commit, then redeploy. Record the before-and-after values and observations for site/API access, Seq logs and traces, metrics support, and Seq public access.
由索引模型根据 Issue 内容生成。
描述
Groomed 2026-10-30 — ready for implementation.
Absorbs #358 (closed) and Part A of #357. The repo-side docs and test work stays in #357. The change itself is made in nevridge/taskflow-deploy, not in this repo; this issue tracks it.
Problem
Two production settings in the taskflow-deploy compose file do not match what this repo's code reads. Both were confirmed on 2026-10-30 by reading the live docker-compose.yml in nevridge/taskflow-deploy (images pinned at sha-5405774).
- Doubled OTLP path.
taskflow-apisetsOpenTelemetry__Endpoint=http://seq:5341/ingest/otlp/v1/logs.TaskFlow.Api/Extensions/OpenTelemetryServiceExtensions.cstreats that value as a base URL and appends/v1/traces(line 46),/v1/metrics(line 58) and/v1/logs(line 99). Production therefore posts to.../ingest/otlp/v1/logs/v1/logs,.../v1/logs/v1/tracesand.../v1/logs/v1/metrics. Dev anddocker-compose.ymlhere use the base formhttp://seq:5341/ingest/otlp, which is what the code expects. ALLOWED_HOSTSon the wrong container.taskflow-apisetsALLOWED_HOSTS=taskflow.skalaforge.com. Only the web preview server reads it (TaskFlow.Web/vite.preview.config.js, lines 1-2). Nothing inTaskFlow.Apireads it.taskflow-webhas onlyAPI_TARGET, so the preview server runs withallowedHosts: true(any host accepted).
Not verified: whether Seq currently rejects the doubled path (and so whether production telemetry is arriving). Live Seq has deliberately not been queried.
User Story
As a TaskFlow operator, I want the production compose file to use the settings the code actually reads, so that production logs and traces reach Seq at the right URLs, and the host restriction applies to the container that enforces it.
Acceptance Criteria
- Given the live
docker-compose.ymlinnevridge/taskflow-deploy, when the change is merged, thentaskflow-apisetsOpenTelemetry__Endpoint=http://seq:5341/ingest/otlp(no signal path, no trailing slash, never empty). - Given the same file, then
ALLOWED_HOSTSis no longer set ontaskflow-api, andtaskflow-websetsALLOWED_HOSTS=taskflow.skalaforge.com. (Default decision: move it. If the restriction is not wanted, remove it fromtaskflow-apiand do not add it totaskflow-web; record that choice here.) - Given both edits, then they are made in one
taskflow-deploycommit and picked up by one redeploy. - Given the redeployed stack, when I open
https://taskflow.skalaforge.comand use the app, then the page loads and API calls through the web container's/apiproxy succeed. (Traefik forwards the originalHostheader, so the host check passes.) - Given the redeployed stack, when the API handles traffic, then new API log records appear in Seq. Traces are checked as well. Whether Seq accepts OTLP metrics is checked against the Seq documentation and recorded here; absence of metrics in Seq is not a failure if Seq does not ingest them.
- Given the work is done, then this issue records the values before and after, and what was observed for criteria 4 and 5.
- Given the work is done, then this issue records whether
taskflow-seq.skalaforge.comis readable without credentials (the live compose runs Seq withSEQ_FIRSTRUN_NOAUTHENTICATION=truebehind a public Traefik route, with no middleware shown in the file). If it is open to the internet, file a separate issue; do not fix it here.
Edge Cases
- Rollback: revert the deploy-repo commit and let Portainer redeploy. Keep the previous values in this issue.
- A wrong
ALLOWED_HOSTSvalue blocks legitimate requests. Check the site immediately after redeploy. The value is comma-separated, no scheme or port. - Telemetry volume and shape change. The API starts exporting to the correct URLs for the first time, so Seq sees new traffic. Existing Seq queries or alerts may behave differently.
- Seq may reject or silently drop mis-pathed data. A "no data" check looks for the absence of recent records, not for errors in the API log.
- An empty
OpenTelemetry__Endpointbypasses the??fallback and throws at startup (new Uri("/v1/logs")). Do not set it empty. - A value that already ends in a signal path is not handled by the API (a trailing slash is). A startup guard is a possible follow-up, not part of this issue.
taskflow-api.skalaforge.comroutes straight to the API and is unaffected by theALLOWED_HOSTSmove.
Out of Scope
- Docs and tests in this repo (#357).
- Other deploy-repo settings.
- Making the API accept, auto-correct or reject endpoints that include a signal path.
- gRPC or other OTLP protocol support.
- Seq authentication, dashboards or alerts (criterion 7 only records the finding).
- Querying live Seq as part of grooming (done by the operator at implementation time).
- 主要语言
- C#
- 星标
- 1
- 派生
- 0
- 平均合并
- 2 小时 2 分钟
- 30 天内合并 PR
- 98
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nevridge/TaskFlow 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
tech-debt
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
查看 nevridge/TaskFlow 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
juandresrodca/AdminForge#54 ·
-
要トリアージ 辞書
难度 1/5 1-3 小时 新手友好度 86/100
yksr-melt/Meltype#1625 · 1 个 reaction ·
维护者通常 1 天内回复
-
Docs typo未关闭
难度 1/5 1 小时以内 新手友好度 78/100
MonoGame/docs.monogame.github.io#328 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
space-wizards/RobustToolbox#7197 ·
维护者通常 1 天内回复
-
documentation high priority
难度 2/5 1-3 小时 新手友好度 76/100
lachydotmcg/capri-desktop#201 ·
维护者通常 1 天内回复