Azure / azure-sdk-for-cpp

This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
173 stars 122 forks source link

Remove the use of deprecated OpenTelemetry APIs in EvenHub stress tests #5784

Open antkmsft opened 3 weeks ago

antkmsft commented 3 weeks ago
/mnt/vss/_work/1/s/sdk/eventhubs/azure-messaging-eventhubs/test/eventhubs-stress-test/src/eventhubs_stress_test.cpp:94:43: error: 'Create' is deprecated [-Werror,-Wdeprecated-declarations]
      = trace_sdk::TracerProviderFactory::Create(std::move(processor), std::move(resource));
                                          ^
/mnt/vss/_work/1/s/build/vcpkg_installed/x64-linux/include/opentelemetry/sdk/trace/tracer_provider_factory.h:41:3: note: 'Create' has been explicitly marked deprecated here
  OPENTELEMETRY_DEPRECATED
  ^
/mnt/vss/_work/1/s/build/vcpkg_installed/x64-linux/include/opentelemetry/common/macros.h:216:38: note: expanded from macro 'OPENTELEMETRY_DEPRECATED'
#  define OPENTELEMETRY_DEPRECATED [[deprecated]]
                                     ^
[ 93%] Linking CXX executable azure-storage-files-shares-test
/mnt/vss/_work/1/s/sdk/eventhubs/azure-messaging-eventhubs/test/eventhubs-stress-test/src/eventhubs_stress_test.cpp:185:44: error: 'Create' is deprecated [-Werror,-Wdeprecated-declarations]
        = logs_sdk::LoggerProviderFactory::Create(std::move(processor), std::move(resource));
                                           ^
/mnt/vss/_work/1/s/build/vcpkg_installed/x64-linux/include/opentelemetry/sdk/logs/logger_provider_factory.h:35:3: note: 'Create' has been explicitly marked deprecated here
  OPENTELEMETRY_DEPRECATED
  ^
/mnt/vss/_work/1/s/build/vcpkg_installed/x64-linux/include/opentelemetry/common/macros.h:216:38: note: expanded from macro 'OPENTELEMETRY_DEPRECATED'
#  define OPENTELEMETRY_DEPRECATED [[deprecated]]

It was introduced in https://github.com/open-telemetry/opentelemetry-cpp/pull/2664/files.

In #5772, I needed to get this unblocked, and I could not figure out the best way to use the new APIs in reasonable amount of time, so I suppressed these two warnings, and logged this issue.

Search our code base for "https://github.com/Azure/azure-sdk-for-cpp/issues/5784" to find all occurrences.

github-actions[bot] commented 3 weeks ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.