OTel hooks: align error attributes and exception recording with spec Appendix D

オープン
#268 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
ruby
領域
observability

調査の方向性

Start with metrics_hook.rb:45-48, metrics_hook.rb:73-75, and traces_hook.rb:25-28; read the OpenFeature SDK change in issue #339 and spec Appendix D to confirm the error code and exception requirements. Then inspect the hook tests and span APIs to see how error stages and exception recording are handled. Done means both hooks emit the specified error attributes and TracesHook#error records exceptions with an option to disable it.

索引モデルが issue の本文から書いたものです。

説明

The OTel hooks don't yet follow Appendix D (Observability) of spec v0.9.0. This was moved here from open-feature/ruby-sdk#300: the SDK's Telemetry.create_evaluation_event already produces the v0.9.0 attributes, and the remaining gaps are in this gem.

Gaps
  • error.type is the exception class, not the error code. MetricsHook#error sets "error.type" => exception.class.name.downcase (metrics_hook.rb:45-48). Appendix D maps error.type to the evaluation's error code, in lowercase snake_case (for example flag_not_found). Since open-feature/ruby-sdk#339, errors raised through hooks carry an error_code (OpenFeature::SDK::EvaluationError), so the code is available.
  • error.message is renamed to feature_flag.error.message. Both hooks remap the SDK's error.message attribute (metrics_hook.rb:73-75, traces_hook.rb:25-28). Appendix D and current OTel semantic conventions use error.message. Dropping the remap is a breaking change for existing dashboards.
  • Exceptions aren't recorded in the error stage. TracesHook has no error stage. Appendix D says the error stage records exception information (record_exception on spans) unless configured to exclude it.
Done means
  • error.type comes from the error code, lowercased.
  • Both hooks emit error.message, released as a breaking change.
  • TracesHook#error records the exception on the current span, with an option to turn that off.
主要言語
Ruby
スター
5
フォーク
13
平均マージ
13時間 36分
マージ済み PR(30日)
50

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

open-feature/ruby-sdk-contrib のほかの issue

open-feature/ruby-sdk-contrib の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。