Skip to content

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

@antkmsft

Description

@antkmsft
/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.

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Event Hubsneeds-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions