azure-sdk-for-cpp icon indicating copy to clipboard operation
azure-sdk-for-cpp copied to clipboard

How to compile opentelemetry enabled code?

Open yxiang92128 opened this issue 2 years ago • 1 comments

Query/Question I see a list of opentelemetry includes got installed when I ran make install as follows: /home/jenkins/azure-sdk-for-cpp/sdk/core/azure-core-tracing-opentelemetry/build # make install [100%] Built target azure-core-tracing-opentelemetry Install the project... -- Install configuration: "Debug" -- Up-to-date: /usr/local/include -- Up-to-date: /usr/local/include/azure -- Up-to-date: /usr/local/include/azure/core -- Up-to-date: /usr/local/include/azure/core/tracing -- Up-to-date: /usr/local/include/azure/core/tracing/opentelemetry -- Up-to-date: /usr/local/include/azure/core/tracing/opentelemetry/dll_import_export.hpp -- Up-to-date: /usr/local/include/azure/core/tracing/opentelemetry/internal -- Up-to-date: /usr/local/include/azure/core/tracing/opentelemetry/internal/apiview.hpp -- Up-to-date: /usr/local/include/azure/core/tracing/opentelemetry/opentelemetry.hpp -- Installing: /usr/local/include/azure/core/tracing/opentelemetry/rtti.hpp -- Up-to-date: /usr/local/share/azure-core-tracing-opentelemetry-cpp/copyright -- Installing: /usr/local/lib64/libazure-core-tracing-opentelemetry.so -- Installing: /usr/local/share/azure-core-tracing-opentelemetry-cpp/azure-core-tracing-opentelemetry-cppTargets.cmake -- Installing: /usr/local/share/azure-core-tracing-opentelemetry-cpp/azure-core-tracing-opentelemetry-cppTargets-debug.cmake -- Installing: /usr/local/share/azure-core-tracing-opentelemetry-cpp/azure-core-tracing-opentelemetry-cppConfig.cmake -- Installing: /usr/local/share/azure-core-tracing-opentelemetry-cpp/azure-core-tracing-opentelemetry-cppConfigVersion.cmake -- Installing: /usr/local/include/azure/core/tracing/opentelemetry/rtti.hpp

When I try to compile a test program by include In file included from AZ_blob_t2.cpp:26:0: /usr/local/include/azure/core/tracing/opentelemetry/opentelemetry.hpp:19:10: fatal error: opentelemetry/trace/provider.h: No such file or directory #include <opentelemetry/trace/provider.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It looks for trace/provider.h which was not installed.

How do I install the missing headers?

Why is this not a Bug or a feature Request? A clear explanation of why is this not a bug or a feature request?

Setup (please complete the following information if applicable):

  • OS: [e.g. iOS]: SLES15SP4 (gcc 7.5.0)
  • IDE : [e.g. IntelliJ]
  • Version of the Library used Latest header

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [ ] Query Added
  • [ ] Setup information Added

yxiang92128 avatar Oct 19 '22 21:10 yxiang92128

The missing header comes from the opentelemetry-cpp vcpkg package. I'm not sure why it would not be present in your environment.

Silly question: did you define the CMAKE variable BUILD_AZURE_CORE_TRACING_OPENTELEMETRY?

Without that, the required opentelemetry-cpp package isn't included by cmake.

LarryOsterman avatar Oct 21 '22 17:10 LarryOsterman

@LarryOsterman This issue is stale, Can we close?

RickWinter avatar Mar 10 '23 20:03 RickWinter