Does otel-cpp require exception now?
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- cpp
- Área
- api, build-system
Línea de trabajo
Comienza con sdk/src/configuration/document_node.cc y las guardas de OPENTELEMETRY_HAVE_EXCEPTIONS; después, reproduce la compilación informada con -fno-exceptions. Revisa las rutas del módulo de configuración que lanzan y capturan excepciones, así como la política de excepciones existente. El trabajo estará terminado cuando el proyecto tenga un enfoque acordado y la compilación sin excepciones tenga éxito o documente claramente que las excepciones son necesarias.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C++
- Estrellas
- 1.4k
- Forks
- 658
- Merge medio
- 2 d 6 h
- PR fusionados (30 d)
- 55
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de open-telemetry/opentelemetry-cpp
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
open-telemetry/opentelemetry-cpp#4745 ·
Los mantenedores suelen responder en 1 día
-
[CMake] Strengthen pkg-config installation tests to detect missing metadata and dependenciesAbiertoneeds-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
open-telemetry/opentelemetry-cpp#4697 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
TracerContext construction might result in a terminateQuizá libre de nuevo @akshat-lakhera la tomó hace 22 días y no hay ningún pull request abierto. Abiertotriage/accepted
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
open-telemetry/opentelemetry-cpp#4684 · 2 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
[CI] Add Ubuntu 26.04 runners to the CI workflowQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertotriage/accepted
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
open-telemetry/opentelemetry-cpp#4596 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
[BUG] Resource::Create() throws bad_variant_access if process.executable.name isn't a stringPosiblemente ocupada @ryux1 la tomó hace 56 días. Abiertobug help wanted triage/accepted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
open-telemetry/opentelemetry-cpp#4535 · 1 comentario · 2 reacciones ·
Los mantenedores suelen responder en 1 día
Todos los issues de open-telemetry/opentelemetry-cpp
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
colbymchenry/codegraph#3223 ·
Los mantenedores suelen responder en 1 día
-
The `ufw` decoder requires the kernel's monotonic timestamp, so UFW lines read from journald decode without any fieldPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
arduino/ArduinoCore-megaavr#152 ·
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoft/microsoft-ui-xaml#12515 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
BlueQuartzSoftware/simplnx#1906 ·
Los mantenedores suelen responder en 4 días