diff --git a/.iwyu.imp b/.iwyu.imp index 53fddd24aa..7ebbeae511 100644 --- a/.iwyu.imp +++ b/.iwyu.imp @@ -9,5 +9,8 @@ # Local opentelemetry-cpp + { "include": ["", "private", "", "public"] }, + { "include": ["", "private", "", "public"] }, + { "include": ["", "private", "", "public"] }, ] diff --git a/api/include/opentelemetry/baggage/propagation/baggage_propagator.h b/api/include/opentelemetry/baggage/propagation/baggage_propagator.h index 6de32882c0..d75409ed60 100644 --- a/api/include/opentelemetry/baggage/propagation/baggage_propagator.h +++ b/api/include/opentelemetry/baggage/propagation/baggage_propagator.h @@ -3,9 +3,15 @@ #pragma once +#include +#include + #include "opentelemetry/baggage/baggage.h" #include "opentelemetry/baggage/baggage_context.h" +#include "opentelemetry/context/context.h" #include "opentelemetry/context/propagation/text_map_propagator.h" +#include "opentelemetry/nostd/function_ref.h" +#include "opentelemetry/nostd/string_view.h" #include "opentelemetry/version.h" OPENTELEMETRY_BEGIN_NAMESPACE diff --git a/api/include/opentelemetry/common/key_value_iterable_view.h b/api/include/opentelemetry/common/key_value_iterable_view.h index fb1a6ea019..e22fb6f06f 100644 --- a/api/include/opentelemetry/common/key_value_iterable_view.h +++ b/api/include/opentelemetry/common/key_value_iterable_view.h @@ -3,9 +3,14 @@ #pragma once +#include +#include #include +#include #include +#include +#include "opentelemetry/common/attribute_value.h" #include "opentelemetry/common/key_value_iterable.h" #include "opentelemetry/nostd/function_ref.h" #include "opentelemetry/nostd/span.h" diff --git a/api/include/opentelemetry/context/context.h b/api/include/opentelemetry/context/context.h index cf5c9cd319..620ca51c8b 100644 --- a/api/include/opentelemetry/context/context.h +++ b/api/include/opentelemetry/context/context.h @@ -4,9 +4,12 @@ #pragma once #include +#include + #include "opentelemetry/context/context_value.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/variant.h" #include "opentelemetry/version.h" OPENTELEMETRY_BEGIN_NAMESPACE diff --git a/api/include/opentelemetry/context/runtime_context.h b/api/include/opentelemetry/context/runtime_context.h index cccc71e32f..73d4dcd908 100644 --- a/api/include/opentelemetry/context/runtime_context.h +++ b/api/include/opentelemetry/context/runtime_context.h @@ -3,8 +3,12 @@ #pragma once +#include +#include + #include "opentelemetry/common/macros.h" #include "opentelemetry/context/context.h" +#include "opentelemetry/context/context_value.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/nostd/string_view.h" #include "opentelemetry/nostd/unique_ptr.h" diff --git a/api/include/opentelemetry/nostd/function_ref.h b/api/include/opentelemetry/nostd/function_ref.h index 1064c966d7..6f0c2dd330 100644 --- a/api/include/opentelemetry/nostd/function_ref.h +++ b/api/include/opentelemetry/nostd/function_ref.h @@ -3,8 +3,10 @@ #pragma once -#include +#include +#include // IWYU pragma: keep #include +#include #include "opentelemetry/version.h" @@ -12,7 +14,7 @@ OPENTELEMETRY_BEGIN_NAMESPACE namespace nostd { template -class function_ref; +class function_ref; // IWYU pragma: keep /** * Non-owning function reference that can be used as a more performant diff --git a/api/include/opentelemetry/nostd/string_view.h b/api/include/opentelemetry/nostd/string_view.h index 5ee86dce23..f0e5bd9e2a 100644 --- a/api/include/opentelemetry/nostd/string_view.h +++ b/api/include/opentelemetry/nostd/string_view.h @@ -12,13 +12,14 @@ #if !defined(OPENTELEMETRY_HAVE_STD_STRING_VIEW) # include -# include # include +# include # include # include # include +# include +# include -# include "opentelemetry/common/macros.h" # include "opentelemetry/version.h" OPENTELEMETRY_BEGIN_NAMESPACE diff --git a/api/include/opentelemetry/nostd/variant.h b/api/include/opentelemetry/nostd/variant.h index d0b2d96001..6f3837c588 100644 --- a/api/include/opentelemetry/nostd/variant.h +++ b/api/include/opentelemetry/nostd/variant.h @@ -54,7 +54,7 @@ OPENTELEMETRY_END_NAMESPACE # ifdef HAVE_ABSEIL # include "absl/types/variant.h" # else -# include "./internal/absl/types/variant.h" +# include "opentelemetry/nostd/internal/absl/types/variant.h" # endif # ifdef _MSC_VER diff --git a/api/include/opentelemetry/plugin/dynamic_load.h b/api/include/opentelemetry/plugin/dynamic_load.h index 10b4a34af4..2da2713555 100644 --- a/api/include/opentelemetry/plugin/dynamic_load.h +++ b/api/include/opentelemetry/plugin/dynamic_load.h @@ -6,19 +6,19 @@ #include #include +#include "opentelemetry/plugin/factory.h" +#include "opentelemetry/version.h" + #ifdef _WIN32 # include "opentelemetry/plugin/detail/dynamic_load_windows.h" // IWYU pragma: export #else # include "opentelemetry/plugin/detail/dynamic_load_unix.h" // IWYU pragma: export #endif -#include "opentelemetry/version.h" OPENTELEMETRY_BEGIN_NAMESPACE namespace plugin { -class Factory; - /** * Load an OpenTelemetry implementation as a plugin. * @param plugin the path to the plugin to load diff --git a/api/include/opentelemetry/trace/noop.h b/api/include/opentelemetry/trace/noop.h index 345c4ba0c9..fa0c7957df 100644 --- a/api/include/opentelemetry/trace/noop.h +++ b/api/include/opentelemetry/trace/noop.h @@ -7,15 +7,21 @@ // This file is part of the internal implementation of OpenTelemetry. Nothing in this file should be // used directly. Please refer to span.h and tracer.h for documentation on these interfaces. -#include +#include +#include -#include "opentelemetry/context/runtime_context.h" +#include "opentelemetry/common/attribute_value.h" +#include "opentelemetry/common/key_value_iterable.h" +#include "opentelemetry/common/timestamp.h" +#include "opentelemetry/context/context_value.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/nostd/string_view.h" #include "opentelemetry/nostd/unique_ptr.h" #include "opentelemetry/trace/span.h" #include "opentelemetry/trace/span_context.h" #include "opentelemetry/trace/span_context_kv_iterable.h" +#include "opentelemetry/trace/span_metadata.h" +#include "opentelemetry/trace/span_startoptions.h" #include "opentelemetry/trace/tracer.h" #include "opentelemetry/trace/tracer_provider.h" #include "opentelemetry/version.h" diff --git a/api/include/opentelemetry/trace/provider.h b/api/include/opentelemetry/trace/provider.h index d5a52a02f6..1439b579be 100644 --- a/api/include/opentelemetry/trace/provider.h +++ b/api/include/opentelemetry/trace/provider.h @@ -5,18 +5,16 @@ #include -#include "opentelemetry/common/macros.h" #include "opentelemetry/common/spin_lock_mutex.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/trace/noop.h" +#include "opentelemetry/trace/tracer_provider.h" #include "opentelemetry/version.h" OPENTELEMETRY_BEGIN_NAMESPACE namespace trace { -class TracerProvider; - /** * Stores the singleton global TracerProvider. */ diff --git a/api/include/opentelemetry/trace/scope.h b/api/include/opentelemetry/trace/scope.h index 11ded4ab6c..20c415cc72 100644 --- a/api/include/opentelemetry/trace/scope.h +++ b/api/include/opentelemetry/trace/scope.h @@ -3,9 +3,11 @@ #pragma once +#include "opentelemetry/context/context.h" #include "opentelemetry/context/runtime_context.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/nostd/unique_ptr.h" +#include "opentelemetry/trace/span.h" #include "opentelemetry/trace/span_metadata.h" #include "opentelemetry/version.h" @@ -13,8 +15,6 @@ OPENTELEMETRY_BEGIN_NAMESPACE namespace trace { -class Span; - /** * Controls how long a span is active. * diff --git a/api/include/opentelemetry/trace/span_context.h b/api/include/opentelemetry/trace/span_context.h index 5fcab6e7ed..9403a74fb6 100644 --- a/api/include/opentelemetry/trace/span_context.h +++ b/api/include/opentelemetry/trace/span_context.h @@ -3,6 +3,8 @@ #pragma once +#include + #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/trace/span_id.h" #include "opentelemetry/trace/trace_flags.h" diff --git a/api/include/opentelemetry/trace/trace_state.h b/api/include/opentelemetry/trace/trace_state.h index f51410025a..753f48c99e 100644 --- a/api/include/opentelemetry/trace/trace_state.h +++ b/api/include/opentelemetry/trace/trace_state.h @@ -3,13 +3,14 @@ #pragma once -#include +#include +#include #include +#include #include "opentelemetry/common/kv_properties.h" #include "opentelemetry/nostd/function_ref.h" #include "opentelemetry/nostd/shared_ptr.h" -#include "opentelemetry/nostd/span.h" #include "opentelemetry/nostd/string_view.h" #include "opentelemetry/nostd/unique_ptr.h" #include "opentelemetry/version.h" diff --git a/api/test/baggage/baggage_benchmark.cc b/api/test/baggage/baggage_benchmark.cc index 4ced142327..0786537cc0 100644 --- a/api/test/baggage/baggage_benchmark.cc +++ b/api/test/baggage/baggage_benchmark.cc @@ -1,11 +1,14 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include +#include +#include +#include + #include "opentelemetry/baggage/baggage.h" #include "opentelemetry/nostd/string_view.h" - -#include -#include +#include "opentelemetry/nostd/utility.h" using namespace opentelemetry::baggage; namespace nostd = opentelemetry::nostd; diff --git a/api/test/baggage/baggage_test.cc b/api/test/baggage/baggage_test.cc index f29615c983..6f0347eef9 100644 --- a/api/test/baggage/baggage_test.cc +++ b/api/test/baggage/baggage_test.cc @@ -1,15 +1,17 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/nostd/string_view.h" - +#include #include +#include #include #include #include "opentelemetry/baggage/baggage.h" +#include "opentelemetry/common/kv_properties.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/string_view.h" -using namespace opentelemetry; using namespace opentelemetry::baggage; std::string header_with_custom_entries(size_t num_entries) @@ -82,7 +84,8 @@ TEST(BaggageTest, ValidateExtractHeader) { auto baggage = Baggage::FromHeader(testcase.input); size_t index = 0; - baggage->GetAllEntries([&testcase, &index](nostd::string_view key, nostd::string_view value) { + baggage->GetAllEntries([&testcase, &index](opentelemetry::nostd::string_view key, + opentelemetry::nostd::string_view value) { EXPECT_EQ(key, testcase.keys[index]); EXPECT_EQ(value, testcase.values[index]); index++; @@ -97,7 +100,7 @@ TEST(BaggageTest, ValidateExtractHeader) // Entries beyond threshold are dropped auto baggage = Baggage::FromHeader(header_with_custom_entries(Baggage::kMaxKeyValuePairs + 1)); auto header = baggage->ToHeader(); - common::KeyValueStringTokenizer kv_str_tokenizer(header); + opentelemetry::common::KeyValueStringTokenizer kv_str_tokenizer(header); int expected_tokens = Baggage::kMaxKeyValuePairs; EXPECT_EQ(kv_str_tokenizer.NumTokens(), expected_tokens); @@ -126,7 +129,7 @@ TEST(BaggageTest, ValidateInjectHeader) for (auto &testcase : testcases) { - nostd::shared_ptr baggage(new Baggage{}); + opentelemetry::nostd::shared_ptr baggage(new Baggage{}); for (size_t i = 0; i < testcase.keys.size(); i++) { baggage = baggage->Set(testcase.keys[i], testcase.values[i]); @@ -202,17 +205,17 @@ TEST(BaggageTest, BaggageRemove) TEST(BaggageTest, BaggageGetAll) { - std::string baggage_header = "k1=v1,k2=v2,k3=v3"; - auto baggage = Baggage::FromHeader(baggage_header); - const int kNumPairs = 3; - nostd::string_view keys[kNumPairs] = {"k1", "k2", "k3"}; - nostd::string_view values[kNumPairs] = {"v1", "v2", "v3"}; - size_t index = 0; - baggage->GetAllEntries( - [&keys, &values, &index](nostd::string_view key, nostd::string_view value) { - EXPECT_EQ(key, keys[index]); - EXPECT_EQ(value, values[index]); - index++; - return true; - }); + std::string baggage_header = "k1=v1,k2=v2,k3=v3"; + auto baggage = Baggage::FromHeader(baggage_header); + const int kNumPairs = 3; + opentelemetry::nostd::string_view keys[kNumPairs] = {"k1", "k2", "k3"}; + opentelemetry::nostd::string_view values[kNumPairs] = {"v1", "v2", "v3"}; + size_t index = 0; + baggage->GetAllEntries([&keys, &values, &index](opentelemetry::nostd::string_view key, + opentelemetry::nostd::string_view value) { + EXPECT_EQ(key, keys[index]); + EXPECT_EQ(value, values[index]); + index++; + return true; + }); } diff --git a/api/test/baggage/propagation/baggage_propagator_test.cc b/api/test/baggage/propagation/baggage_propagator_test.cc index c966fe7603..0efe1fac19 100644 --- a/api/test/baggage/propagation/baggage_propagator_test.cc +++ b/api/test/baggage/propagation/baggage_propagator_test.cc @@ -2,11 +2,20 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/baggage/propagation/baggage_propagator.h" #include #include +#include #include +#include +#include + +#include "opentelemetry/baggage/baggage.h" #include "opentelemetry/baggage/baggage_context.h" +#include "opentelemetry/baggage/propagation/baggage_propagator.h" +#include "opentelemetry/context/context.h" +#include "opentelemetry/context/propagation/text_map_propagator.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/utility.h" using namespace opentelemetry; using namespace opentelemetry::baggage::propagation; diff --git a/api/test/common/kv_properties_test.cc b/api/test/common/kv_properties_test.cc index f616664265..e81ee6979c 100644 --- a/api/test/common/kv_properties_test.cc +++ b/api/test/common/kv_properties_test.cc @@ -3,12 +3,15 @@ // SPDX-License-Identifier: Apache-2.0 #include -#include - +#include #include #include #include +#include +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/utility.h" + // ------------------------- Entry class tests --------------------------------- using namespace opentelemetry; diff --git a/api/test/common/spinlock_benchmark.cc b/api/test/common/spinlock_benchmark.cc index d0fef2c41b..b5e98a2108 100644 --- a/api/test/common/spinlock_benchmark.cc +++ b/api/test/common/spinlock_benchmark.cc @@ -1,10 +1,21 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/common/spin_lock_mutex.h" - #include -#include +#include +#include +#include +#include +#include + +#if defined(__i386__) || defined(__x86_64__) +# if defined(__clang__) || defined(__INTEL_COMPILER) +# include // for _mm_pause +# endif +#endif + +#include "opentelemetry/common/macros.h" +#include "opentelemetry/common/spin_lock_mutex.h" namespace { diff --git a/api/test/common/string_util_test.cc b/api/test/common/string_util_test.cc index da2e635119..f074d4fbe3 100644 --- a/api/test/common/string_util_test.cc +++ b/api/test/common/string_util_test.cc @@ -2,11 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 #include -#include +#include -#include -#include -#include +#include // ------------------------- StringUtil class tests --------------------------------- diff --git a/api/test/context/context_test.cc b/api/test/context/context_test.cc index 294f1cd180..0798d7a130 100644 --- a/api/test/context/context_test.cc +++ b/api/test/context/context_test.cc @@ -1,11 +1,16 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/context/context.h" - +#include +#include #include +#include -#include +#include "opentelemetry/context/context.h" +#include "opentelemetry/context/context_value.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/variant.h" using namespace opentelemetry; diff --git a/api/test/context/propagation/composite_propagator_test.cc b/api/test/context/propagation/composite_propagator_test.cc index 075841080f..e905f64e1a 100644 --- a/api/test/context/propagation/composite_propagator_test.cc +++ b/api/test/context/propagation/composite_propagator_test.cc @@ -1,22 +1,32 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/nostd/string_view.h" -#include "opentelemetry/trace/scope.h" -#include "opentelemetry/trace/span.h" -#include "opentelemetry/trace/span_context.h" +#include +#include +#include +#include +#include +#include +#include +#include "opentelemetry/context/context.h" #include "opentelemetry/context/propagation/composite_propagator.h" #include "opentelemetry/context/propagation/text_map_propagator.h" +#include "opentelemetry/context/runtime_context.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/variant.h" #include "opentelemetry/trace/default_span.h" #include "opentelemetry/trace/propagation/b3_propagator.h" #include "opentelemetry/trace/propagation/http_trace_context.h" - -#include -#include -#include - -#include +#include "opentelemetry/trace/scope.h" +#include "opentelemetry/trace/span.h" +#include "opentelemetry/trace/span_context.h" +#include "opentelemetry/trace/span_id.h" +#include "opentelemetry/trace/span_metadata.h" +#include "opentelemetry/trace/trace_flags.h" +#include "opentelemetry/trace/trace_id.h" using namespace opentelemetry; diff --git a/api/test/context/runtime_context_test.cc b/api/test/context/runtime_context_test.cc index cd551c599c..f8407b0ca8 100644 --- a/api/test/context/runtime_context_test.cc +++ b/api/test/context/runtime_context_test.cc @@ -1,13 +1,22 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/context/runtime_context.h" -#include "opentelemetry/context/context.h" - +#include +#include +#include #include #include +#include +#include +#include -#include +#include "opentelemetry/context/context.h" +#include "opentelemetry/context/context_value.h" +#include "opentelemetry/context/runtime_context.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/unique_ptr.h" +#include "opentelemetry/nostd/variant.h" using namespace opentelemetry; diff --git a/api/test/core/timestamp_test.cc b/api/test/core/timestamp_test.cc index 8efc0215be..ba3c70e4e5 100644 --- a/api/test/core/timestamp_test.cc +++ b/api/test/core/timestamp_test.cc @@ -1,9 +1,11 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/common/timestamp.h" - #include +#include +#include + +#include "opentelemetry/common/timestamp.h" using opentelemetry::common::SteadyTimestamp; using opentelemetry::common::SystemTimestamp; diff --git a/api/test/core/version_test.cc b/api/test/core/version_test.cc index 2e360ffdad..1ceb68602b 100644 --- a/api/test/core/version_test.cc +++ b/api/test/core/version_test.cc @@ -1,9 +1,11 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/version.h" - #include +#include +#include + +#include "opentelemetry/version.h" TEST(VersionTest, Consistency) { diff --git a/api/test/logs/logger_benchmark.cc b/api/test/logs/logger_benchmark.cc index 7e8913a3f7..29808fa003 100644 --- a/api/test/logs/logger_benchmark.cc +++ b/api/test/logs/logger_benchmark.cc @@ -1,29 +1,30 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/common/timestamp.h" -#include "opentelemetry/logs/logger.h" -#include "opentelemetry/logs/provider.h" -#include "opentelemetry/nostd/shared_ptr.h" - -#include +#include +#include +#include #include +#include #include #include #include #include -#include +#include "opentelemetry/common/key_value_iterable_view.h" +#include "opentelemetry/logs/event_id.h" +#include "opentelemetry/logs/logger.h" +#include "opentelemetry/logs/logger_provider.h" +#include "opentelemetry/logs/provider.h" +#include "opentelemetry/logs/severity.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/string_view.h" using opentelemetry::logs::EventId; using opentelemetry::logs::Provider; using opentelemetry::logs::Severity; -namespace common = opentelemetry::common; -namespace nostd = opentelemetry::nostd; -namespace trace = opentelemetry::trace; -namespace log_api = opentelemetry::logs; - namespace { diff --git a/api/test/logs/logger_test.cc b/api/test/logs/logger_test.cc index 848f053453..351e079dd4 100644 --- a/api/test/logs/logger_test.cc +++ b/api/test/logs/logger_test.cc @@ -2,13 +2,27 @@ // SPDX-License-Identifier: Apache-2.0 #include -#include +#include +#include +#include #include -#include "opentelemetry/common/timestamp.h" +#include "opentelemetry/common/attribute_value.h" +#include "opentelemetry/common/key_value_iterable.h" +#include "opentelemetry/common/key_value_iterable_view.h" +#include "opentelemetry/logs/event_id.h" +#include "opentelemetry/logs/event_logger.h" +#include "opentelemetry/logs/event_logger_provider.h" +#include "opentelemetry/logs/log_record.h" #include "opentelemetry/logs/logger.h" +#include "opentelemetry/logs/logger_provider.h" #include "opentelemetry/logs/provider.h" +#include "opentelemetry/logs/severity.h" #include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/unique_ptr.h" +#include "opentelemetry/nostd/utility.h" using opentelemetry::logs::EventId; using opentelemetry::logs::Logger; diff --git a/api/test/logs/provider_test.cc b/api/test/logs/provider_test.cc index 92c589ef7e..298289ceab 100644 --- a/api/test/logs/provider_test.cc +++ b/api/test/logs/provider_test.cc @@ -2,10 +2,17 @@ // SPDX-License-Identifier: Apache-2.0 #include -#include +#include +#include "opentelemetry/common/key_value_iterable.h" +#include "opentelemetry/logs/event_logger.h" +#include "opentelemetry/logs/event_logger_provider.h" +#include "opentelemetry/logs/logger.h" +#include "opentelemetry/logs/logger_provider.h" #include "opentelemetry/logs/provider.h" #include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/utility.h" using opentelemetry::logs::EventLogger; using opentelemetry::logs::EventLoggerProvider; diff --git a/api/test/metrics/meter_provider_test.cc b/api/test/metrics/meter_provider_test.cc index b8fb083799..639f0e8f49 100644 --- a/api/test/metrics/meter_provider_test.cc +++ b/api/test/metrics/meter_provider_test.cc @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 #include + +#include "opentelemetry/metrics/meter_provider.h" #include "opentelemetry/metrics/noop.h" #include "opentelemetry/metrics/provider.h" #include "opentelemetry/nostd/shared_ptr.h" diff --git a/api/test/metrics/noop_sync_instrument_test.cc b/api/test/metrics/noop_sync_instrument_test.cc index 6411e0e820..4218f2b4ff 100644 --- a/api/test/metrics/noop_sync_instrument_test.cc +++ b/api/test/metrics/noop_sync_instrument_test.cc @@ -2,8 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 #include +#include #include +#include +#include + +#include "opentelemetry/context/context.h" #include "opentelemetry/metrics/noop.h" +#include "opentelemetry/metrics/sync_instruments.h" +#include "opentelemetry/nostd/string_view.h" TEST(Counter, Add) { diff --git a/api/test/nostd/shared_ptr_test.cc b/api/test/nostd/shared_ptr_test.cc index 2ebba82628..e5f77709b1 100644 --- a/api/test/nostd/shared_ptr_test.cc +++ b/api/test/nostd/shared_ptr_test.cc @@ -1,11 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/nostd/shared_ptr.h" - #include - +#include #include +#include +#include + +#include "opentelemetry/nostd/shared_ptr.h" using opentelemetry::nostd::shared_ptr; diff --git a/api/test/nostd/span_test.cc b/api/test/nostd/span_test.cc index 17427a249a..b54883d67a 100644 --- a/api/test/nostd/span_test.cc +++ b/api/test/nostd/span_test.cc @@ -1,10 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/nostd/span.h" - -#include - +#include +#include #include #include #include @@ -12,7 +10,7 @@ #include #include -#include +#include "opentelemetry/nostd/span.h" using opentelemetry::nostd::span; diff --git a/api/test/nostd/string_view_test.cc b/api/test/nostd/string_view_test.cc index bbd5cb0648..f32da62b42 100644 --- a/api/test/nostd/string_view_test.cc +++ b/api/test/nostd/string_view_test.cc @@ -1,11 +1,14 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/nostd/string_view.h" - #include #include #include +#include +#include +#include + +#include "opentelemetry/nostd/string_view.h" using opentelemetry::nostd::string_view; diff --git a/api/test/nostd/unique_ptr_test.cc b/api/test/nostd/unique_ptr_test.cc index 893525c266..9fbe058822 100644 --- a/api/test/nostd/unique_ptr_test.cc +++ b/api/test/nostd/unique_ptr_test.cc @@ -1,9 +1,11 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/nostd/unique_ptr.h" - #include +#include +#include + +#include "opentelemetry/nostd/unique_ptr.h" using opentelemetry::nostd::unique_ptr; diff --git a/api/test/nostd/utility_test.cc b/api/test/nostd/utility_test.cc index 821b2a70a4..5c62df0c88 100644 --- a/api/test/nostd/utility_test.cc +++ b/api/test/nostd/utility_test.cc @@ -1,13 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/nostd/utility.h" - +#include +#include #include #include #include -#include +#include "opentelemetry/nostd/utility.h" namespace nostd = opentelemetry::nostd; diff --git a/api/test/plugin/dynamic_load_test.cc b/api/test/plugin/dynamic_load_test.cc index 8e8b14800c..68a27b5a8f 100644 --- a/api/test/plugin/dynamic_load_test.cc +++ b/api/test/plugin/dynamic_load_test.cc @@ -1,10 +1,10 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/plugin/dynamic_load.h" -#include "opentelemetry/plugin/factory.h" - #include +#include + +#include "opentelemetry/plugin/dynamic_load.h" TEST(LoadFactoryTest, FailureTest) { diff --git a/api/test/singleton/component_a.cc b/api/test/singleton/component_a.cc index bdf03cb699..1660f85685 100644 --- a/api/test/singleton/component_a.cc +++ b/api/test/singleton/component_a.cc @@ -1,9 +1,12 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include "opentelemetry/context/context_value.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/trace/provider.h" -#include "opentelemetry/version.h" +#include "opentelemetry/trace/scope.h" +#include "opentelemetry/trace/tracer.h" +#include "opentelemetry/trace/tracer_provider.h" #include "component_a.h" diff --git a/api/test/singleton/component_b.cc b/api/test/singleton/component_b.cc index 966d9c461a..ea53f39b6e 100644 --- a/api/test/singleton/component_b.cc +++ b/api/test/singleton/component_b.cc @@ -1,9 +1,12 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include "opentelemetry/context/context_value.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/trace/provider.h" -#include "opentelemetry/version.h" +#include "opentelemetry/trace/scope.h" +#include "opentelemetry/trace/tracer.h" +#include "opentelemetry/trace/tracer_provider.h" #include "component_b.h" diff --git a/api/test/singleton/component_c.cc b/api/test/singleton/component_c.cc index cd87ceb727..9fae8b41db 100644 --- a/api/test/singleton/component_c.cc +++ b/api/test/singleton/component_c.cc @@ -1,9 +1,12 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include "opentelemetry/context/context_value.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/trace/provider.h" -#include "opentelemetry/version.h" +#include "opentelemetry/trace/scope.h" +#include "opentelemetry/trace/tracer.h" +#include "opentelemetry/trace/tracer_provider.h" #define BUILD_COMPONENT_C diff --git a/api/test/singleton/component_d.cc b/api/test/singleton/component_d.cc index 313fd1d23a..57f3252826 100644 --- a/api/test/singleton/component_d.cc +++ b/api/test/singleton/component_d.cc @@ -1,9 +1,12 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include "opentelemetry/context/context_value.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/trace/provider.h" -#include "opentelemetry/version.h" +#include "opentelemetry/trace/scope.h" +#include "opentelemetry/trace/tracer.h" +#include "opentelemetry/trace/tracer_provider.h" #define BUILD_COMPONENT_D diff --git a/api/test/singleton/component_e.cc b/api/test/singleton/component_e.cc index 9c88d27732..94eec808ab 100644 --- a/api/test/singleton/component_e.cc +++ b/api/test/singleton/component_e.cc @@ -1,9 +1,12 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include "opentelemetry/context/context_value.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/trace/provider.h" -#include "opentelemetry/version.h" +#include "opentelemetry/trace/scope.h" +#include "opentelemetry/trace/tracer.h" +#include "opentelemetry/trace/tracer_provider.h" #define BUILD_COMPONENT_E diff --git a/api/test/singleton/component_f.cc b/api/test/singleton/component_f.cc index 33b0af2fbd..9083e2bced 100644 --- a/api/test/singleton/component_f.cc +++ b/api/test/singleton/component_f.cc @@ -1,9 +1,12 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include "opentelemetry/context/context_value.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/trace/provider.h" -#include "opentelemetry/version.h" +#include "opentelemetry/trace/scope.h" +#include "opentelemetry/trace/tracer.h" +#include "opentelemetry/trace/tracer_provider.h" #define BUILD_COMPONENT_F diff --git a/api/test/singleton/component_g.cc b/api/test/singleton/component_g.cc index 50de03ee98..0529ca7c27 100644 --- a/api/test/singleton/component_g.cc +++ b/api/test/singleton/component_g.cc @@ -1,9 +1,12 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include "opentelemetry/context/context_value.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/trace/provider.h" -#include "opentelemetry/version.h" +#include "opentelemetry/trace/scope.h" +#include "opentelemetry/trace/tracer.h" +#include "opentelemetry/trace/tracer_provider.h" namespace trace = opentelemetry::trace; namespace nostd = opentelemetry::nostd; diff --git a/api/test/singleton/component_h.cc b/api/test/singleton/component_h.cc index 3ff6e0cc5a..a66ab96858 100644 --- a/api/test/singleton/component_h.cc +++ b/api/test/singleton/component_h.cc @@ -1,9 +1,12 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include "opentelemetry/context/context_value.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/trace/provider.h" -#include "opentelemetry/version.h" +#include "opentelemetry/trace/scope.h" +#include "opentelemetry/trace/tracer.h" +#include "opentelemetry/trace/tracer_provider.h" namespace trace = opentelemetry::trace; namespace nostd = opentelemetry::nostd; diff --git a/api/test/singleton/singleton_test.cc b/api/test/singleton/singleton_test.cc index fb4551cfe9..d212221118 100644 --- a/api/test/singleton/singleton_test.cc +++ b/api/test/singleton/singleton_test.cc @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 #include +#include /* TODO: @@ -12,8 +13,6 @@ # include #endif -#include - #include "component_a.h" #include "component_b.h" #include "component_c.h" @@ -21,11 +20,18 @@ #include "component_e.h" #include "component_f.h" +#include "opentelemetry/common/key_value_iterable.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/utility.h" #include "opentelemetry/trace/default_span.h" +#include "opentelemetry/trace/noop.h" #include "opentelemetry/trace/provider.h" #include "opentelemetry/trace/span.h" +#include "opentelemetry/trace/span_context.h" #include "opentelemetry/trace/span_context_kv_iterable.h" #include "opentelemetry/trace/span_startoptions.h" +#include "opentelemetry/trace/tracer.h" #include "opentelemetry/trace/tracer_provider.h" using namespace opentelemetry; diff --git a/api/test/trace/key_value_iterable_view_test.cc b/api/test/trace/key_value_iterable_view_test.cc index e0f43c4afb..b2334b8f98 100644 --- a/api/test/trace/key_value_iterable_view_test.cc +++ b/api/test/trace/key_value_iterable_view_test.cc @@ -1,11 +1,18 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/common/key_value_iterable_view.h" - #include #include +#include +#include +#include + +#include "opentelemetry/common/attribute_value.h" +#include "opentelemetry/common/key_value_iterable.h" +#include "opentelemetry/common/key_value_iterable_view.h" +#include "opentelemetry/nostd/string_view.h" #include "opentelemetry/nostd/type_traits.h" +#include "opentelemetry/nostd/utility.h" using namespace opentelemetry; diff --git a/api/test/trace/noop_test.cc b/api/test/trace/noop_test.cc index b47700d442..26663c738f 100644 --- a/api/test/trace/noop_test.cc +++ b/api/test/trace/noop_test.cc @@ -1,14 +1,27 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/trace/noop.h" -#include "opentelemetry/common/timestamp.h" - +#include +#include +#include #include -#include #include +#include +#include -#include +#include "opentelemetry/common/timestamp.h" +#include "opentelemetry/context/context_value.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/unique_ptr.h" +#include "opentelemetry/trace/noop.h" +#include "opentelemetry/trace/span.h" +#include "opentelemetry/trace/span_context.h" +#include "opentelemetry/trace/span_id.h" +#include "opentelemetry/trace/span_metadata.h" +#include "opentelemetry/trace/trace_flags.h" +#include "opentelemetry/trace/trace_id.h" +#include "opentelemetry/trace/tracer.h" namespace trace_api = opentelemetry::trace; namespace nonstd = opentelemetry::nostd; diff --git a/api/test/trace/propagation/b3_propagation_test.cc b/api/test/trace/propagation/b3_propagation_test.cc index 732db1bd34..a2a0581ad1 100644 --- a/api/test/trace/propagation/b3_propagation_test.cc +++ b/api/test/trace/propagation/b3_propagation_test.cc @@ -1,14 +1,30 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include +#include +#include +#include +#include +#include "util.h" + +#include "opentelemetry/context/context.h" +#include "opentelemetry/context/context_value.h" +#include "opentelemetry/context/propagation/text_map_propagator.h" #include "opentelemetry/context/runtime_context.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/variant.h" +#include "opentelemetry/trace/default_span.h" #include "opentelemetry/trace/propagation/b3_propagator.h" #include "opentelemetry/trace/scope.h" -#include "util.h" - -#include - -#include +#include "opentelemetry/trace/span.h" +#include "opentelemetry/trace/span_context.h" +#include "opentelemetry/trace/span_id.h" +#include "opentelemetry/trace/span_metadata.h" +#include "opentelemetry/trace/trace_flags.h" +#include "opentelemetry/trace/trace_id.h" using namespace opentelemetry; diff --git a/api/test/trace/propagation/detail/hex_test.cc b/api/test/trace/propagation/detail/hex_test.cc index f4bd765f48..88cf5b46b0 100644 --- a/api/test/trace/propagation/detail/hex_test.cc +++ b/api/test/trace/propagation/detail/hex_test.cc @@ -1,11 +1,12 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/trace/propagation/detail/hex.h" - -#include - #include +#include +#include + +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/trace/propagation/detail/hex.h" using namespace opentelemetry; diff --git a/api/test/trace/propagation/http_text_format_test.cc b/api/test/trace/propagation/http_text_format_test.cc index 99f7117928..54f041a9cc 100644 --- a/api/test/trace/propagation/http_text_format_test.cc +++ b/api/test/trace/propagation/http_text_format_test.cc @@ -1,17 +1,35 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include +#include +#include +#include +#include +#include +#include +#include "util.h" + +#include "opentelemetry/context/context.h" +#include "opentelemetry/context/context_value.h" #include "opentelemetry/context/propagation/global_propagator.h" +#include "opentelemetry/context/propagation/text_map_propagator.h" #include "opentelemetry/context/runtime_context.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/variant.h" #include "opentelemetry/trace/context.h" +#include "opentelemetry/trace/default_span.h" #include "opentelemetry/trace/propagation/http_trace_context.h" #include "opentelemetry/trace/scope.h" -#include "util.h" - -#include -#include - -#include +#include "opentelemetry/trace/span.h" +#include "opentelemetry/trace/span_context.h" +#include "opentelemetry/trace/span_id.h" +#include "opentelemetry/trace/span_metadata.h" +#include "opentelemetry/trace/trace_flags.h" +#include "opentelemetry/trace/trace_id.h" +#include "opentelemetry/trace/trace_state.h" using namespace opentelemetry; diff --git a/api/test/trace/propagation/jaeger_propagation_test.cc b/api/test/trace/propagation/jaeger_propagation_test.cc index f0fdaf734d..637d2206b8 100644 --- a/api/test/trace/propagation/jaeger_propagation_test.cc +++ b/api/test/trace/propagation/jaeger_propagation_test.cc @@ -1,13 +1,33 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/trace/propagation/jaeger.h" -#include "opentelemetry/trace/scope.h" -#include "util.h" - +#include +#include +#include #include +#include +#include +#include +#include "util.h" -#include +#include "opentelemetry/context/context.h" +#include "opentelemetry/context/context_value.h" +#include "opentelemetry/context/propagation/text_map_propagator.h" +#include "opentelemetry/context/runtime_context.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/variant.h" +#include "opentelemetry/trace/context.h" +#include "opentelemetry/trace/default_span.h" +#include "opentelemetry/trace/propagation/jaeger.h" +#include "opentelemetry/trace/scope.h" +#include "opentelemetry/trace/span.h" +#include "opentelemetry/trace/span_context.h" +#include "opentelemetry/trace/span_id.h" +#include "opentelemetry/trace/span_metadata.h" +#include "opentelemetry/trace/trace_flags.h" +#include "opentelemetry/trace/trace_id.h" using namespace opentelemetry; diff --git a/api/test/trace/provider_test.cc b/api/test/trace/provider_test.cc index be2ca2842c..6b59d91245 100644 --- a/api/test/trace/provider_test.cc +++ b/api/test/trace/provider_test.cc @@ -1,12 +1,14 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/trace/provider.h" +#include + #include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/trace/provider.h" +#include "opentelemetry/trace/tracer.h" #include "opentelemetry/trace/tracer_provider.h" -#include - using opentelemetry::trace::Provider; using opentelemetry::trace::Tracer; using opentelemetry::trace::TracerProvider; diff --git a/api/test/trace/scope_test.cc b/api/test/trace/scope_test.cc index b74905b167..1383122bbc 100644 --- a/api/test/trace/scope_test.cc +++ b/api/test/trace/scope_test.cc @@ -1,12 +1,16 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/trace/scope.h" -#include "opentelemetry/context/context.h" +#include + +#include "opentelemetry/context/context_value.h" +#include "opentelemetry/context/runtime_context.h" #include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/variant.h" #include "opentelemetry/trace/noop.h" - -#include +#include "opentelemetry/trace/scope.h" +#include "opentelemetry/trace/span.h" +#include "opentelemetry/trace/span_metadata.h" using opentelemetry::trace::kSpanKey; using opentelemetry::trace::NoopSpan; diff --git a/api/test/trace/span_benchmark.cc b/api/test/trace/span_benchmark.cc index 3120eb0e5a..8770ec14a0 100644 --- a/api/test/trace/span_benchmark.cc +++ b/api/test/trace/span_benchmark.cc @@ -1,15 +1,24 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include +#include + +#include "opentelemetry/context/context_value.h" +#include "opentelemetry/context/runtime_context.h" #include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/variant.h" #include "opentelemetry/trace/context.h" +#include "opentelemetry/trace/default_span.h" #include "opentelemetry/trace/noop.h" +#include "opentelemetry/trace/span.h" +#include "opentelemetry/trace/span_context.h" #include "opentelemetry/trace/span_id.h" +#include "opentelemetry/trace/span_startoptions.h" +#include "opentelemetry/trace/trace_flags.h" #include "opentelemetry/trace/trace_id.h" - -#include - -#include +#include "opentelemetry/trace/tracer.h" using opentelemetry::trace::SpanContext; namespace trace_api = opentelemetry::trace; diff --git a/api/test/trace/span_id_benchmark.cc b/api/test/trace/span_id_benchmark.cc index 42d4aeb465..236fa3ac76 100644 --- a/api/test/trace/span_id_benchmark.cc +++ b/api/test/trace/span_id_benchmark.cc @@ -1,11 +1,12 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/trace/span_id.h" - #include #include +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/trace/span_id.h" + namespace { using opentelemetry::trace::SpanId; diff --git a/api/test/trace/trace_flags_test.cc b/api/test/trace/trace_flags_test.cc index 783b56d839..d900c6f7d5 100644 --- a/api/test/trace/trace_flags_test.cc +++ b/api/test/trace/trace_flags_test.cc @@ -1,12 +1,11 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/trace/trace_flags.h" - -#include +#include +#include #include -#include +#include "opentelemetry/trace/trace_flags.h" namespace { diff --git a/api/test/trace/trace_state_test.cc b/api/test/trace/trace_state_test.cc index e6ed73c1f4..d136bddb00 100644 --- a/api/test/trace/trace_state_test.cc +++ b/api/test/trace/trace_state_test.cc @@ -1,10 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "opentelemetry/trace/trace_state.h" - #include +#include +#include +#include + #include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/trace/trace_state.h" namespace { diff --git a/api/test/trace/tracer_test.cc b/api/test/trace/tracer_test.cc index 8e16f15e25..77396a24d2 100644 --- a/api/test/trace/tracer_test.cc +++ b/api/test/trace/tracer_test.cc @@ -1,11 +1,14 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include + +#include "opentelemetry/context/context_value.h" #include "opentelemetry/nostd/shared_ptr.h" #include "opentelemetry/trace/noop.h" -#include "opentelemetry/trace/scope.h" - -#include +#include "opentelemetry/trace/span.h" +#include "opentelemetry/trace/span_context.h" +#include "opentelemetry/trace/tracer.h" namespace trace_api = opentelemetry::trace; namespace nostd = opentelemetry::nostd; diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_factory.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_factory.h index f8b3ee1fc3..11b185a384 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_factory.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_factory.h @@ -3,6 +3,8 @@ #pragma once +#include + #include "opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_options.h" #include "opentelemetry/sdk/metrics/push_metric_exporter.h" diff --git a/ext/include/opentelemetry/ext/http/client/http_client.h b/ext/include/opentelemetry/ext/http/client/http_client.h index 1089402e28..d17215da9b 100644 --- a/ext/include/opentelemetry/ext/http/client/http_client.h +++ b/ext/include/opentelemetry/ext/http/client/http_client.h @@ -6,8 +6,10 @@ #include #include #include +#include #include #include + #include "opentelemetry/nostd/function_ref.h" #include "opentelemetry/nostd/string_view.h" #include "opentelemetry/version.h" diff --git a/functional/otlp/func_http_main.cc b/functional/otlp/func_http_main.cc index ece1588425..99fec8443e 100644 --- a/functional/otlp/func_http_main.cc +++ b/functional/otlp/func_http_main.cc @@ -1,6 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include #include #include #include