OTLP exporter v1.22.0 - Resulting deployment is not correct

Abierto
#3,570 12 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
cmake, cpp, grpc
Área
build-system

Línea de trabajo

Reproduce la instalación usando install/cmake/third_party_latest y la configuración de CMakeLists.txt mostrada; después, inspecciona la configuración del paquete CMake de opentelemetry-cpp instalado. Comienza con las declaraciones de dependencias generadas y la llamada fallida a find_package(Protobuf CONFIG). Se considera terminado cuando se determine si make install proporciona o documenta correctamente cada dependencia necesaria para los componentes OTLP solicitados.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug Stale triage/needs-information

Describe your environment

RH 8.10

Installed everything from source for OTLP sdk/exporters only

ci/install_thirdparty.sh --install-dir /home/gp/usr/local/otelLibs --tags-file install/cmake/third_party_latest --packages "abseil;ms-gsl;zlib;protobuf;grpc;ms-gsl;opentelemetry-proto"

For otel build

cmake -DCMAKE_INSTALL_PREFIX=/home/gp/usr/local/otel ..

-- gRPC_CPP_PLUGIN_EXECUTABLE=$<TARGET_FILE:gRPC::grpc_cpp_plugin>
-- PROTOBUF_PROTOC_EXECUTABLE=$<TARGET_FILE:protobuf::protoc>


-- build settings


-- OpenTelemetry: 1.22.0
-- OpenTelemetry ABI: 2
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- CXX: GNU 8.5.0
-- CMAKE_BUILD_TYPE: Release
-- CXXFLAGS:
-- CMAKE_CXX_STANDARD: 17
-- CMAKE_TOOLCHAIN_FILE:
-- BUILD_SHARED_LIBS:


-- opentelemetry-cpp build options


-- WITH_API_ONLY: OFF
-- WITH_NO_DEPRECATED_CODE: ON
-- WITH_ABI_VERSION_1: OFF
-- WITH_ABI_VERSION_2: ON
-- OTELCPP_VERSIONED_LIBS: OFF
-- OTELCPP_MAINTAINER_MODE: OFF
-- WITH_STL: CXX17
-- WITH_GSL: OFF
-- WITH_NO_GETENV: OFF


-- opentelemetry-cpp cmake component options


-- WITH_OTLP_GRPC: ON
-- WITH_OTLP_HTTP: OFF
-- WITH_OTLP_FILE: OFF
-- WITH_HTTP_CLIENT_CURL: OFF
-- WITH_ZIPKIN: OFF
-- WITH_PROMETHEUS: OFF
-- WITH_ELASTICSEARCH: OFF
-- WITH_OPENTRACING: OFF
-- WITH_ETW:
-- OPENTELEMETRY_BUILD_DLL:


-- feature preview options


-- WITH_ASYNC_EXPORT_PREVIEW: ON
-- WITH_THREAD_INSTRUMENTATION_PREVIEW: ON
-- WITH_METRICS_EXEMPLAR_PREVIEW: ON
-- WITH_OTLP_GRPC_SSL_MTLS_PREVIEW: ON
-- WITH_OTLP_GRPC_CREDENTIAL_PREVIEW: ON
-- WITH_OTLP_RETRY_PREVIEW: ON


-- third-party options


-- WITH_NLOHMANN_JSON: OFF
-- WITH_CURL_LOGGING: OFF
-- WITH_OTLP_HTTP_COMPRESSION: OFF


-- examples and test options


-- WITH_BENCHMARK: OFF
-- WITH_EXAMPLES: ON
-- WITH_EXAMPLES_HTTP: OFF
-- WITH_FUNC_TESTS: OFF
-- BUILD_W3CTRACECONTEXT_TEST: OFF
-- BUILD_TESTING: OFF


-- versions


-- CMake: 3.26.5
-- GTest: ()
-- benchmark: ()
-- Abseil: 20240722
-- opentelemetry-proto: 1.7.0 (fetch_repository)
-- Protobuf: 30.2.0 (find_package - STATIC_LIBRARY)
-- gRPC: 1.72.1 (find_package - STATIC_LIBRARY)
-- ZLIB: 1.2.11 ()

Build & deployment succeeds.

What is the expected behavior?

"make install" will deploy all needed artefacts.

Setting the below in my CMakeList.txt to be sufficient

list(APPEND CMAKE_PREFIX_PATH "/home/gp/usr/local/otel/lib64/cmake/")
find_package(opentelemetry-cpp CONFIG REQUIRED)

What is the actual behavior?

CMake fails, it tries to find libraries I thought are only needed for the SDK building

-- get_installed_components: component = api, installed = TRUE
-- get_installed_components: component = sdk, installed = TRUE
-- get_installed_components: component = ext_common, installed = TRUE
-- get_installed_components: component = exporters_otlp_common, installed = TRUE
-- get_installed_components: component = exporters_otlp_grpc, installed = TRUE
-- get_installed_components: component = exporters_ostream, installed = TRUE
-- get_installed_components: component = exporters_in_memory, installed = TRUE
-- get_requested_components: Components requested: api;sdk;exporters_otlp_grpc
-- find_required_dependencies: dependency = Microsoft.GSL, is_required = FALSE
-- find_required_dependencies: dependency = ZLIB, is_required = FALSE
-- find_required_dependencies: dependency = CURL, is_required = FALSE
-- find_required_dependencies: dependency = nlohmann_json, is_required = FALSE
-- find_required_dependencies: dependency = Protobuf, is_required = TRUE
-- find_required_dependencies: calling find_dependency(Protobuf CONFIG )...

CMake Error at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package):
Could not find a package configuration file provided by "Protobuf" with any
of the following names:

ProtobufConfig.cmake
protobuf-config.cmake

Add the installation prefix of "Protobuf" to CMAKE_PREFIX_PATH or set
"Protobuf_DIR" to a directory containing one of the above files. If
"Protobuf" provides a separate development package or SDK, be sure it has
been installed.

Have I done something wrong or my expectation, the OTEL public API doesnt pull any third party dependency, is wrong?

Lenguaje dominante
C++
Estrellas
1.4k
Forks
660
Merge medio
2 d 6 h
PR fusionados (30 d)
55

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de open-telemetry/opentelemetry-cpp

Todos los issues de open-telemetry/opentelemetry-cpp

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.