Does otel-cpp require exception now?
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- cpp
- 領域
- api, build-system
調査の方向性
sdk/src/configuration/document_node.cc と OPENTELEMETRY_HAVE_EXCEPTIONS のガードから始め、続いて -fno-exceptions を指定して報告されたビルドを再現します。configuration モジュールの例外を送出および捕捉する経路と、既存の例外ポリシーを確認します。プロジェクトとして合意された方針があり、例外なしのビルドが成功するか、例外が必要であることを明確に文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
After upgrading to 1.29.0, building with -fno-exceptions fails with the following errors:
[ 50%] Building CXX object sdk/src/configuration/CMakeFiles/opentelemetry_configuration_core.dir/document_node.cc.o
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.29.0/sdk/src/configuration/document_node.cc: In member function ‘std::string opentelemetry::v1::sdk::configuration::DocumentNode::DoOneSubstitution(const std::string&) const’:
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.29.0/sdk/src/configuration/document_node.cc:116:53: error: exception handling disabled, use ‘-fexceptions’ to enable
116 | throw InvalidSchemaException(Location(), message);
| ^
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.29.0/sdk/src/configuration/document_node.cc: In member function ‘int64_t opentelemetry::v1::sdk::configuration::DocumentNode::SignedIntegerFromString(const std::string&) const’:
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.29.0/sdk/src/configuration/document_node.cc:269:3: error: ‘...’ handler must be the last handler for its try block [-fpermissive]
269 | catch (const std::invalid_argument &)
| ^~~~~
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.29.0/sdk/src/configuration/document_node.cc: In member function ‘bool opentelemetry::v1::sdk::configuration::DocumentNode::BooleanFromString(const std::string&) const’:
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.29.0/sdk/src/configuration/document_node.cc:238:1: warning: control reaches end of non-void function [-Wreturn-type]
238 | }
| ^
gmake[2]: *** [sdk/src/configuration/CMakeFiles/opentelemetry_configuration_core.dir/build.make:79: sdk/src/configuration/CMakeFiles/opentelemetry_configuration_core.dir/document_node.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:923: sdk/src/configuration/CMakeFiles/opentelemetry_configuration_core.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
'/usr/local/bin/cmake' '--build' '.' '--verbose'
Change Dir: '/home/runner/work/cmake-toolset/cmake-toolset/test/build_jobs_dir/_deps/opentelemetry_cpp-v1.29.0/linux-x86_64-gnu-13'
It looks like much of the code in the configuration module isn't guarded by OPENTELEMETRY_HAVE_EXCEPTIONS. Are exceptions now a hard requirement, or can I raise to a PR fixing this?
If a fix is welcome, I can see a few possible approaches:
- Replace all
throw XXXExceptionstatements withstd::abort()when exceptions are disabled. - Disable the configuration module entirely when exceptions are disabled.
- Rework the configuration APIs that currently throw so they report failures to the caller (e.g., via a status/result type), and log the original exception message to the global logger.It may changes a lot of APIs.
Which approach would you prefer? I'm happy to put together a PR once we agree on the direction.
- 主要言語
- C++
- スター
- 1.4k
- フォーク
- 658
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 55
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
open-telemetry/opentelemetry-cpp のほかの issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
open-telemetry/opentelemetry-cpp#4745 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
open-telemetry/opentelemetry-cpp#4697 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
TracerContext construction might result in a terminate再び着手できるかも @akshat-lakhera が 21 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンtriage/accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
open-telemetry/opentelemetry-cpp#4684 · コメント 2 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[CI] Add Ubuntu 26.04 runners to the CI workflow対応中かも @deodattap が 33 日前に担当しました。 オープンtriage/accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
open-telemetry/opentelemetry-cpp#4596 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Resource::Create() throws bad_variant_access if process.executable.name isn't a string対応中かも @ryux1 が 55 日前に担当しました。 オープンbug help wanted triage/accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
open-telemetry/opentelemetry-cpp#4535 · コメント 1 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
open-telemetry/opentelemetry-cpp の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
pocoproject/poco#5626 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Issue-Bug Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
microsoft/winget-cli#6645 ·
メンテナーはふだん 2 日以内に返信
-
cleanup help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ESPresense/ESPresense#2602 ·
メンテナーはふだん 1 日以内に返信
-
devex good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信