diff --git a/doc/DistributedTracing.md b/doc/DistributedTracing.md index 863f4adac..2c373d31a 100644 --- a/doc/DistributedTracing.md +++ b/doc/DistributedTracing.md @@ -52,11 +52,7 @@ in-memory logger. opentelemetry::nostd::shared_ptr CreateOpenTelemetryProvider() { -#if USE_MEMORY_EXPORTER - auto exporter = std::make_unique(); -#else - auto exporter = std::make_unique(); -#endif + auto exporter = std::make_unique(); // simple processor auto simple_processor = std::unique_ptr( diff --git a/sdk/core/azure-core-tracing-opentelemetry/README.md b/sdk/core/azure-core-tracing-opentelemetry/README.md index a88a40b9a..f0d91521a 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/README.md +++ b/sdk/core/azure-core-tracing-opentelemetry/README.md @@ -61,8 +61,7 @@ After this, the SDK API implementations will be able to retrieve the tracer prov ```cpp // Start by creating an OpenTelemetry Provider. -auto exporter = std::make_unique(); -m_spanData = exporter->GetData(); +auto exporter = std::make_unique(); // simple processor auto simple_processor = std::unique_ptr( diff --git a/sdk/core/azure-core-tracing-opentelemetry/test/ut/CMakeLists.txt b/sdk/core/azure-core-tracing-opentelemetry/test/ut/CMakeLists.txt index 8411492c3..a73d7272d 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/test/ut/CMakeLists.txt +++ b/sdk/core/azure-core-tracing-opentelemetry/test/ut/CMakeLists.txt @@ -9,6 +9,16 @@ add_compile_definitions(AZURE_TEST_DATA_PATH="${CMAKE_BINARY_DIR}") add_compile_definitions(AZURE_TEST_RECORDING_DIR="${CMAKE_CURRENT_LIST_DIR}") +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang") + add_compile_options(-Wno-error=deprecated-declarations) +endif() + +if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") +# Disable deprecation warnings. + add_compile_options(/wd4996) +endif() + + project (azure-core-tracing-opentelemetry-test LANGUAGES CXX) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED True) diff --git a/sdk/core/azure-core-tracing-opentelemetry/test/ut/service_support_test.cpp b/sdk/core/azure-core-tracing-opentelemetry/test/ut/service_support_test.cpp index 66d14624d..b183fcf3f 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/test/ut/service_support_test.cpp +++ b/sdk/core/azure-core-tracing-opentelemetry/test/ut/service_support_test.cpp @@ -262,10 +262,10 @@ protected: { EXPECT_EQ( expectedSpanContents["library"]["name"].get(), - span->GetInstrumentationLibrary().GetName()); + span->GetInstrumentationScope().GetName()); EXPECT_EQ( expectedSpanContents["library"]["version"].get(), - span->GetInstrumentationLibrary().GetVersion()); + span->GetInstrumentationScope().GetVersion()); } return true; } @@ -502,10 +502,10 @@ TEST_F(OpenTelemetryServiceTests, NestSpans) "my-service", opentelemetry::nostd::get(attributes.at("az.namespace"))); } - EXPECT_EQ("my-service", spans[0]->GetInstrumentationLibrary().GetName()); - EXPECT_EQ("my-service", spans[1]->GetInstrumentationLibrary().GetName()); - EXPECT_EQ("1.0beta-2", spans[0]->GetInstrumentationLibrary().GetVersion()); - EXPECT_EQ("1.0beta-2", spans[1]->GetInstrumentationLibrary().GetVersion()); + EXPECT_EQ("my-service", spans[0]->GetInstrumentationScope().GetName()); + EXPECT_EQ("my-service", spans[1]->GetInstrumentationScope().GetName()); + EXPECT_EQ("1.0beta-2", spans[0]->GetInstrumentationScope().GetVersion()); + EXPECT_EQ("1.0beta-2", spans[1]->GetInstrumentationScope().GetVersion()); // The trace ID for the inner and outer requests must be the same, the parent-id/span-id must be // different. diff --git a/vcpkg.json b/vcpkg.json index a76a3ffd3..17fa92fee 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -24,9 +24,5 @@ } ], "overrides": [ - { - "name": "opentelemetry-cpp", - "version": "1.4.1" - } ] }