Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

OTLP exporter v1.22.0 - Resulting deployment is not correct

Aperta
#3,570 12 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cmake, cpp, grpc
Ambito
build-system

Direzione di ricerca

Riproduci l’installazione usando install/cmake/third_party_latest e la configurazione CMakeLists.txt mostrata, quindi esamina la configurazione del pacchetto CMake opentelemetry-cpp installato. Inizia dalle dichiarazioni delle dipendenze generate e dalla chiamata fallita a find_package(Protobuf CONFIG). Il lavoro è terminato quando è stato determinato se make install fornisce o documenta correttamente ogni dipendenza necessaria per i componenti OTLP richiesti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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?

Lingua principale
C++
Stelle
1.4k
Fork
656
Merge medio
1g 19h
PR unite (30g)
51

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di open-telemetry/opentelemetry-cpp

Tutte le issue di open-telemetry/opentelemetry-cpp

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.