diff --git a/.github/workflows/iwyu.yml b/.github/workflows/iwyu.yml index 42881ec6b6..f3b180ab45 100644 --- a/.github/workflows/iwyu.yml +++ b/.github/workflows/iwyu.yml @@ -53,6 +53,8 @@ jobs: -DWITH_STL=CXX14 \ -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="include-what-you-use;-w;-Xiwyu;--mapping_file=${TOPDIR}/.iwyu.imp;" \ -DBUILD_TESTING=ON \ + -DWITH_EXAMPLES=ON \ + -DWITH_EXAMPLES_HTTP=ON \ -DBUILD_W3CTRACECONTEXT_TEST=ON \ -DWITH_OTLP_GRPC=ON \ -DWITH_OTLP_HTTP=ON \ diff --git a/examples/http/client.cc b/examples/http/client.cc index c89f496ab8..b83b052781 100644 --- a/examples/http/client.cc +++ b/examples/http/client.cc @@ -1,12 +1,30 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#include "opentelemetry/context/propagation/global_propagator.h" +#include "opentelemetry/context/propagation/text_map_propagator.h" +#include "opentelemetry/context/runtime_context.h" +#include "opentelemetry/ext/http/client/http_client.h" #include "opentelemetry/ext/http/client/http_client_factory.h" #include "opentelemetry/ext/http/common/url_parser.h" +#include "opentelemetry/nostd/function_ref.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/string_view.h" #include "opentelemetry/semconv/http_attributes.h" #include "opentelemetry/semconv/url_attributes.h" +#include "opentelemetry/trace/span.h" +#include "opentelemetry/trace/span_metadata.h" +#include "opentelemetry/trace/span_startoptions.h" +#include "opentelemetry/trace/tracer.h" #include "tracer_common.h" +#include +#include +#include +#include +#include +#include + namespace { diff --git a/examples/http/server.cc b/examples/http/server.cc index 23b37d3ab9..b9cd265a24 100644 --- a/examples/http/server.cc +++ b/examples/http/server.cc @@ -1,16 +1,31 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#include "server.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/variant.h" #include "opentelemetry/semconv/client_attributes.h" #include "opentelemetry/semconv/incubating/http_attributes.h" #include "opentelemetry/semconv/server_attributes.h" #include "opentelemetry/semconv/url_attributes.h" #include "opentelemetry/trace/context.h" +#include "opentelemetry/trace/scope.h" +#include "opentelemetry/trace/span.h" +#include "opentelemetry/trace/span_context.h" +#include "opentelemetry/trace/span_metadata.h" +#include "opentelemetry/trace/span_startoptions.h" +#include "opentelemetry/trace/tracer.h" #include "tracer_common.h" +#include +#include #include +#include #include +#include +#include "server.h" namespace { diff --git a/examples/http/server.h b/examples/http/server.h index 5691a6e465..9e0cfbfdce 100644 --- a/examples/http/server.h +++ b/examples/http/server.h @@ -2,9 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once + +#include "opentelemetry/ext/http/server/http_server.h" + +#include #include #include -#include "opentelemetry/ext/http/server/http_server.h" namespace {