[Feature]: OTel plugin: emit severityText and severityNumber on enriched logs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 67/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
Start with packages/aws-durable-execution-sdk-python-otel/src/aws_durable_execution_sdk_python_otel/log_filter.py, especially OtelContextLogFilter.filter(), and trace how enriched records from the Invocation and Execution plugins reach serialized structured logs. Check existing tests for durable context logs, stdlib logs, and replay behavior. Add coverage for the specified severity mappings and field types across initial and resumed invocations; done means both views emit top-level severity fields while disabled enrichment and default logging remain unchanged.
索引モデルが issue の本文から書いたものです。
説明
What would you like?
When aws-durable-execution-sdk-python-otel log enrichment is enabled, include OpenTelemetry severityText and severityNumber on the emitted structured application logs, alongside the existing native log level and trace correlation fields.
This is the Python counterpart of https://github.com/aws/aws-durable-execution-sdk-js/issues/1228.
The current OtelContextLogFilter.filter() adds traceId, spanId, and otelTraceSampled, but does not add either severity field. Both Invocation and Execution OTel plugins use this filter when enrich_logger=True. This finding is based on source inspection of main at 54883810bc417c59017540bae31e35fa9b35bd8c.
OTel-aware consumers, including CloudWatch Logs Analyze logs as described in the JS issue, need the standard severity fields to recognize, filter, and group log severity.
Possible Implementation
Extend the OTel logging enrichment path to set severityText from the source log level and map Python log levels to OpenTelemetry severity numbers:
| Python level | severityText | severityNumber |
|---|---|---|
| DEBUG | DEBUG | 5 |
| INFO | INFO | 9 |
| WARNING | WARNING | 13 |
| ERROR | ERROR | 17 |
| CRITICAL, when logged through stdlib logging | CRITICAL | 21 |
WARNING is Python's spelling of the WARN severity range. logger.exception() should receive ERROR severity, like logger.error().
Follow the OTel log data model. The telemetry exporter's existing severity mapping is based on execution status and cannot be reused directly as an application log-level mapping.
Keep this additive and scoped to active OTel log enrichment. Preserve the existing native level, trace correlation, durable metadata, and replay suppression. Ensure the fields reach the serialized structured log output as top-level fields, with numeric severityNumber, rather than existing only as internal LogRecord attributes.
Acceptance criteria:
- Both Invocation and Execution views emit the fields with the correct types and mappings.
- Cover the durable context logger and stdlib logs that already flow through the enrichment filter.
- Cover an initial invocation and a resumed invocation, preserving suppression of completed durable logs during replay.
- Without the plugin, or with log enrichment disabled, the default logging behavior remains unchanged.
Is this a breaking change?
No.
Does this require an RFC?
No.
Additional Context
- 主要言語
- Python
- スター
- 59
- フォーク
- 32
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 76
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws/aws-durable-execution-sdk-python のほかの issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
aws/aws-durable-execution-sdk-python#977 ·
メンテナーはふだん 1 日以内に返信
-
[AgentCore session] Remove the unused session timeout対応中かも @srivilliamsai が今日担当しました。 オープンneeds-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
aws/aws-durable-execution-sdk-python#970 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/aws-durable-execution-sdk-python#952 ·
メンテナーはふだん 1 日以内に返信
-
[AgentCore session] W4: Document sessions in the worker README対応中かも @ParidelPooya が 3 日前に担当しました。 オープンenhancement needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
aws/aws-durable-execution-sdk-python#950 ·
メンテナーはふだん 1 日以内に返信
-
[AgentCore session] W3: Add the session ID and job count to worker logs対応中かも @ParidelPooya が 3 日前に担当しました。 オープンenhancement needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
aws/aws-durable-execution-sdk-python#949 ·
メンテナーはふだん 1 日以内に返信
aws/aws-durable-execution-sdk-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
Unused loot bag group names left in dreamcraft en_US.lang対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンStatus: Triage Suggestion
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
GTNewHorizons/GT-New-Horizons-Modpack#27789 ·
メンテナーはふだん 1 日以内に返信
-
bug frontend sev-5
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
-
core good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
b4b code health next
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信