Skip to content

Commit c8640fb

Browse files
committed
Fix iwyu warnings
1 parent f6ff444 commit c8640fb

File tree

10 files changed

+22
-14
lines changed

10 files changed

+22
-14
lines changed

sdk/src/logs/batch_log_record_processor.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ bool BatchLogRecordProcessor::ForceFlush(std::chrono::microseconds timeout) noex
9797
std::unique_lock<std::mutex> lk_cv(synchronization_data_->force_flush_cv_m);
9898

9999
std::uint64_t current_sequence =
100-
synchronization_data_->force_flush_pending_sequence.fetch_add(1, std::memory_order_release) +
101-
1;
100+
synchronization_data_->force_flush_pending_sequence.fetch_add(1, std::memory_order_release) 1;
102101
synchronization_data_->force_flush_timeout_us.store(timeout.count(), std::memory_order_release);
103102
auto break_condition = [this, current_sequence]() {
104103
if (synchronization_data_->is_shutdown.load() == true)

sdk/src/metrics/aggregation/sum_aggregation.cc

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,8 @@ void LongSumAggregation::Aggregate(int64_t value, const PointAttributes & /* att
4646

4747
std::unique_ptr<Aggregation> LongSumAggregation::Merge(const Aggregation &delta) const noexcept
4848
{
49-
int64_t merge_value =
50-
nostd::get<int64_t>(
51-
nostd::get<SumPointData>((static_cast<const LongSumAggregation &>(delta).ToPoint()))
52-
.value_) +
49+
int64_t merge_value = nostd::get<int64_t>(
50+
nostd::get<SumPointData>((static_cast<const LongSumAggregation &>(delta).ToPoint())).value_)
5351
nostd::get<int64_t>(nostd::get<SumPointData>(ToPoint()).value_);
5452
std::unique_ptr<Aggregation> aggr(new LongSumAggregation(point_data_.is_monotonic_));
5553
static_cast<LongSumAggregation *>(aggr.get())->point_data_.value_ = merge_value;
@@ -101,10 +99,8 @@ void DoubleSumAggregation::Aggregate(double value,
10199

102100
std::unique_ptr<Aggregation> DoubleSumAggregation::Merge(const Aggregation &delta) const noexcept
103101
{
104-
double merge_value =
105-
nostd::get<double>(
106-
nostd::get<SumPointData>((static_cast<const DoubleSumAggregation &>(delta).ToPoint()))
107-
.value_) +
102+
double merge_value = nostd::get<double>(
103+
nostd::get<SumPointData>((static_cast<const DoubleSumAggregation &>(delta).ToPoint())).value_)
108104
nostd::get<double>(nostd::get<SumPointData>(ToPoint()).value_);
109105
std::unique_ptr<Aggregation> aggr(new DoubleSumAggregation(point_data_.is_monotonic_));
110106
static_cast<DoubleSumAggregation *>(aggr.get())->point_data_.value_ = merge_value;

sdk/src/trace/batch_span_processor.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ bool BatchSpanProcessor::ForceFlush(std::chrono::microseconds timeout) noexcept
9393
std::unique_lock<std::mutex> lk_cv(synchronization_data_->force_flush_cv_m);
9494

9595
std::uint64_t current_sequence =
96-
synchronization_data_->force_flush_pending_sequence.fetch_add(1, std::memory_order_release) +
97-
1;
96+
synchronization_data_->force_flush_pending_sequence.fetch_add(1, std::memory_order_release) 1;
9897
synchronization_data_->force_flush_timeout_us.store(timeout.count(), std::memory_order_release);
9998
auto break_condition = [this, current_sequence]() {
10099
if (synchronization_data_->is_shutdown.load() == true)

sdk/src/trace/tracer.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <stdint.h>
55
#include <chrono>
6+
#include <functional>
67
#include <map>
78
#include <new>
89
#include <utility>

sdk/src/trace/tracer_context.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <utility>
77
#include <vector>
88

9+
#include "opentelemetry/sdk/instrumentationscope/instrumentation_scope.h"
910
#include "opentelemetry/sdk/resource/resource.h"
1011
#include "opentelemetry/sdk/trace/id_generator.h"
1112
#include "opentelemetry/sdk/trace/multi_span_processor.h"

sdk/src/trace/tracer_context_factory.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <utility>
66
#include <vector>
77

8+
#include "opentelemetry/sdk/instrumentationscope/instrumentation_scope.h"
89
#include "opentelemetry/sdk/resource/resource.h"
910
#include "opentelemetry/sdk/trace/id_generator.h"
1011
#include "opentelemetry/sdk/trace/processor.h"

sdk/src/trace/tracer_provider.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include <algorithm>
55
#include <chrono>
6-
#include <functional>
76
#include <mutex>
87
#include <utility>
98
#include <vector>

sdk/src/trace/tracer_provider_factory.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <utility>
66
#include <vector>
77

8+
#include "opentelemetry/sdk/instrumentationscope/instrumentation_scope.h"
89
#include "opentelemetry/sdk/resource/resource.h"
910
#include "opentelemetry/sdk/trace/id_generator.h"
1011
#include "opentelemetry/sdk/trace/processor.h"

sdk/test/trace/tracer_config_test.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
// Copyright The OpenTelemetry Authors
22
// SPDX-License-Identifier: Apache-2.0
33

4+
#include "opentelemetry/sdk/trace/tracer_config.h"
45
#include <gtest/gtest.h>
5-
#include <opentelemetry/sdk/trace/tracer_config.h>
6+
#include <array>
7+
#include <functional>
8+
#include <type_traits>
9+
#include <utility>
10+
#include "opentelemetry/common/attribute_value.h"
11+
#include "opentelemetry/nostd/string_view.h"
12+
#include "opentelemetry/nostd/unique_ptr.h"
13+
#include "opentelemetry/sdk/instrumentationscope/instrumentation_scope.h"
614

715
namespace trace_sdk = opentelemetry::sdk::trace;
816
namespace instrumentation_scope = opentelemetry::sdk::instrumentationscope;

sdk/test/trace/tracer_test.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "opentelemetry/nostd/unique_ptr.h"
2929
#include "opentelemetry/nostd/utility.h"
3030
#include "opentelemetry/nostd/variant.h"
31+
#include "opentelemetry/sdk/instrumentationscope/instrumentation_scope.h"
3132
#include "opentelemetry/sdk/resource/resource.h"
3233
#include "opentelemetry/sdk/trace/exporter.h"
3334
#include "opentelemetry/sdk/trace/id_generator.h"
@@ -41,8 +42,10 @@
4142
#include "opentelemetry/sdk/trace/simple_processor.h"
4243
#include "opentelemetry/sdk/trace/span_data.h"
4344
#include "opentelemetry/sdk/trace/tracer.h"
45+
#include "opentelemetry/sdk/trace/tracer_config.h"
4446
#include "opentelemetry/sdk/trace/tracer_context.h"
4547
#include "opentelemetry/trace/context.h"
48+
#include "opentelemetry/trace/noop.h"
4649
#include "opentelemetry/trace/scope.h"
4750
#include "opentelemetry/trace/span.h"
4851
#include "opentelemetry/trace/span_context.h"

0 commit comments

Comments
 (0)