v3: name the JSON log fields after the OpenTelemetry semantic conventions
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
- 領域
- backend, observability
調査の方向性
Start at the v3 --log-format json entry point and compare the current fields with the linked OpenTelemetry HTTP and Logs Data Model conventions. Review #749, #637, #759, and #760 to understand the related logging work. Done means the field mapping and default-versus-opt-in format are agreed with maintainers and implemented consistently.
索引モデルが issue の本文から書いたものです。
説明
Search for duplicate feature request
- I already searched, and this feature request or improvement is not a duplicate.
Feature scope
Improve existing functionality
Feature request related to a problem
We run SWS behind a CDN and ship its logs to an OpenTelemetry pipeline (collector filelog receiver → a log backend). v3's JSON format (--log-format json) is a big step forward, but its field names are SWS-specific, so every deployment that feeds an OpenTelemetry (or ECS/Loki/Datadog-style) backend has to maintain its own rename/parse rules:
{"timestamp":"…","level":"INFO","message":"incoming request","method":"GET","uri":"/missing.css","remote_addr":"::ffff:192.168.65.1","target":"static_web_server::log_addr"}
{"timestamp":"…","level":"WARN","method":"GET","uri":"/missing.css","status":404,"error":"Not Found","target":"static_web_server::error_page"}
The maintainer noted in #735 that v3 has more freedom to adjust the logging structure. While v3 is still in beta, aligning the JSON field names with the OpenTelemetry semantic conventions would be a one-time, low-cost change that makes SWS logs usable by standard pipelines without per-deployment mapping.
Describe the solution you'd like
In the JSON log format, name the HTTP fields after the OpenTelemetry HTTP semantic conventions (stable):
| today | OpenTelemetry semconv |
|---|---|
method |
http.request.method |
uri |
url.path (+ url.query when present) |
status |
http.response.status_code |
remote_addr |
client.address (and client.port) |
| — | http.response.body.size, user_agent.original, duration |
and keep level as the severity text (already matching the Logs Data Model SeverityText) and timestamp as RFC 3339.
This composes with the in-flight work instead of competing with it:
- #749 (one response line per request with the status) — that line would carry these fields;
- #637 (
%{token}access log format) — covers users who want nginx/NCSA text; this request is about the default structured JSON; - #759 / #760 (opt-in
trace_id/span_idfromtraceparent) — the remaining piece for log↔trace correlation.
If renaming the default is too disruptive even in beta, an opt-in --log-format otel (JSON with semconv names) would work equally well for us.
Describe alternatives you've considered
Renaming fields in the collector (what we do today) works, but every user repeats it, and it breaks silently whenever SWS changes a field. OTLP export from SWS itself would be heavier than needed; semconv-named JSON on stdout/stderr is what collectors already ingest.
Additional context
Happy to help with a PR once the maintainers agree on the shape (rename in beta vs. an opt-in format).
- 主要言語
- Rust
- スター
- 2.4k
- フォーク
- 135
- 平均マージ
- 5日 6時間
- マージ済み PR(30日)
- 17
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
static-web-server/static-web-server のほかの issue
-
Markdown content negotiation responses lack Vary: Accept対応中かも @davlgd が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
static-web-server/static-web-server#788 ·
メンテナーはふだん 1 日以内に返信
-
page-fallback ignores mime-types対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug help wanted v3
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
static-web-server/static-web-server#779 ·
メンテナーはふだん 1 日以内に返信
-
documentation enhancement help wanted release v2
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
static-web-server/static-web-server#711 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Custom headers are not applied to early responses (redirects, 405, health, CORS preflight, maintenance)対応中かも @frenzzy が 1 日前に担当しました。 オープンadvanced-feature bug v3
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
static-web-server/static-web-server#783 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Opt-in trace context (trace_id, span_id from traceparent) in JSON log lines対応中かも @frenzzy が 29 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
static-web-server/static-web-server#759 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
static-web-server/static-web-server の issue をすべて見る
似ている issue
-
component:benchmark
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
agentic-os-org/ANOLISA#9177 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
oracle/rust-oracledb#61 ·
-
bug priority-medium to-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
Databricks tool-only response crashes in resolve_reasoning_and_content with KeyError: content対応中かも @1divyanshdev が今日担当しました。 オープンllm translation
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
BerriAI/litellm#48637 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信