-
Notifications
You must be signed in to change notification settings - Fork 511
Description
Describe your environment
Same as in #3673
Windows 11, VS2022, cmake-4.1.1, ninja 1.13.1
opentelemetry-cpp dependencies are built as shared libraries
Steps to reproduce
Build opentelemetry 1.23.0 on Windows as a single shared dll (using OPENTELEMETRY_BUILD_DLL cmake option)as described in #3673, including patching ext/src/dll/input.src, and replacing "-DWITH_EXAMPLES=OFF -DWITH_EXAMPLES_HTTP=OFF" with "-DWITH_EXAMPLES=ON -DWITH_EXAMPLES_HTTP=ON". The build will have built the metrics_simple example and then will fail due to failure to link other examples (because of the same underlying issues as in #3673).
Then put the build opentelemetry-cpp.dll (along with it's dependencies such as protobuf/abseil DLLs) on PATH and run the built <BUILD_ROOT>\opentelemetry-cpp-1.23.0\build\examples\metrics_simple\metrics_ostream_example.exe with or without any parameters such as "counter".
What is the expected behavior?
Exported metrics displayed on stdout, just like it happens on Linux.
What is the actual behavior?
The exe appears to hang for 10 seconds then it exits. Nothing is displayed on stdout.
Additional context
Modifying the example to set up an OtlpHttpMetricExporter using http://localhost:56633/v1/metric as the url and install a custom LogHandler via opentelemetry::sdk::common::internal_log::GlobalLogHandler::SetLogHandler shows there is no attempt to connect to the non-existent OTLP HTTP metric exporter url (unlike when attempting to use a non-existent OTLP Http trace exporter url for traces).