Skip to content

OTLP exporter v1.22.0 - Resulting deployment is not correct #3570

@gparlamas

Description

@gparlamas

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage/needs-informationIndicates an issue needs more information in order to work on it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions