Skip to content

Commit

Permalink
added some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
msiddhu committed Jul 4, 2024
1 parent 7c0cacc commit cd1f9fc
Show file tree
Hide file tree
Showing 20 changed files with 8 additions and 30 deletions.
11 changes: 1 addition & 10 deletions api/test/logs/logger_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,9 @@
#include <benchmark/benchmark.h>

using opentelemetry::logs::EventId;
using opentelemetry::logs::Logger;
using opentelemetry::logs::LoggerProvider;
using opentelemetry::logs::Provider;
using opentelemetry::logs::Severity;
using opentelemetry::nostd::shared_ptr;
using opentelemetry::nostd::span;
using opentelemetry::nostd::string_view;

namespace common = opentelemetry::common;
namespace nostd = opentelemetry::nostd;
namespace trace = opentelemetry::trace;
namespace log_api = opentelemetry::logs;


namespace
{
Expand Down
2 changes: 0 additions & 2 deletions api/test/logs/logger_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ using opentelemetry::logs::LoggerProvider;
using opentelemetry::logs::Provider;
using opentelemetry::logs::Severity;
using opentelemetry::nostd::shared_ptr;
using opentelemetry::nostd::span;
using opentelemetry::nostd::string_view;
namespace common = opentelemetry::common;
namespace nostd = opentelemetry::nostd;
namespace trace = opentelemetry::trace;

// Check that the default logger is a noop logger instance
TEST(Logger, GetLoggerDefault)
Expand Down
1 change: 0 additions & 1 deletion api/test/metrics/meter_provider_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "opentelemetry/metrics/provider.h"
#include "opentelemetry/nostd/shared_ptr.h"

using opentelemetry::metrics::Meter;
using opentelemetry::metrics::MeterProvider;
using opentelemetry::metrics::NoopMeterProvider;
using opentelemetry::metrics::Provider;
Expand Down
2 changes: 1 addition & 1 deletion api/test/nostd/shared_ptr_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ TEST(SharedPtrTest, MoveConstructionFromStdSharedPtr)
TEST(SharedPtrTest, Destruction)
{
bool was_destructed;
shared_ptr<A>{new A{was_destructed}};
shared_ptr<A>{new A{was_destructed}}; //NOLINT
EXPECT_TRUE(was_destructed);
}

Expand Down
1 change: 0 additions & 1 deletion api/test/trace/tracer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace trace_api = opentelemetry::trace;
namespace nostd = opentelemetry::nostd;
namespace context = opentelemetry::context;

TEST(TracerTest, GetCurrentSpan)
{
Expand Down
1 change: 0 additions & 1 deletion examples/metrics_simple/metrics_ostream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#endif

namespace metrics_sdk = opentelemetry::sdk::metrics;
namespace common = opentelemetry::common;
namespace exportermetrics = opentelemetry::exporter::metrics;
namespace metrics_api = opentelemetry::metrics;

Expand Down
1 change: 0 additions & 1 deletion examples/plugin/plugin/tracer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
namespace nostd = opentelemetry::nostd;
namespace common = opentelemetry::common;
namespace trace = opentelemetry::trace;
namespace context = opentelemetry::context;

namespace
{
Expand Down
1 change: 0 additions & 1 deletion exporters/memory/test/in_memory_span_data_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <gtest/gtest.h>

using opentelemetry::exporter::memory::InMemorySpanData;
using opentelemetry::sdk::trace::Recordable;
using opentelemetry::sdk::trace::SpanData;

TEST(InMemorySpanData, AddRecordable)
Expand Down
1 change: 0 additions & 1 deletion exporters/ostream/test/ostream_metric_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <vector>

namespace metric_sdk = opentelemetry::sdk::metrics;
namespace nostd = opentelemetry::nostd;
namespace exportermetrics = opentelemetry::exporter::metrics;

TEST(OStreamMetricsExporter, Shutdown)
Expand Down
2 changes: 1 addition & 1 deletion ext/src/http/client/curl/http_client_curl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ bool HttpClient::doAbortSessions()
}

bool has_data = false;
for (auto session : pending_to_abort_sessions)
for (const auto& session : pending_to_abort_sessions)
{
if (!session.second)
{
Expand Down
3 changes: 2 additions & 1 deletion ext/test/http/curl_http_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <fstream>
#include <memory>
#include <thread>
#include <utility>
#include <vector>

#define HTTP_PORT 19000
Expand Down Expand Up @@ -74,7 +75,7 @@ class PostEventHandler : public CustomEventHandler
class FinishInCallbackHandler : public CustomEventHandler
{
public:
FinishInCallbackHandler(std::shared_ptr<http_client::Session> session) : session_(session) {}
FinishInCallbackHandler(std::shared_ptr<http_client::Session> session) : session_(std::move(session)) {}

void OnResponse(http_client::Response &response) noexcept override
{
Expand Down
3 changes: 3 additions & 0 deletions run-clang-tidy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

# Define the find command to exclude certain directories and find relevant files
FIND='find . -name third_party -prune -o -name build -prune -o -name .git -prune -o -name "*.h" -o -name "*.cc" -print'

Expand Down
2 changes: 0 additions & 2 deletions sdk/src/logs/logger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ namespace sdk
{
namespace logs
{
namespace trace_api = opentelemetry::trace;
namespace common = opentelemetry::common;

Logger::Logger(
opentelemetry::nostd::string_view name,
Expand Down
1 change: 0 additions & 1 deletion sdk/src/trace/batch_span_processor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "opentelemetry/version.h"

using opentelemetry::sdk::common::AtomicUniquePtr;
using opentelemetry::sdk::common::CircularBuffer;
using opentelemetry::sdk::common::CircularBufferRange;
using opentelemetry::trace::SpanContext;

Expand Down
1 change: 0 additions & 1 deletion sdk/test/metrics/async_metric_storage_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ using namespace opentelemetry::sdk::metrics;
using namespace opentelemetry::sdk::instrumentationscope;
using namespace opentelemetry::sdk::resource;
using namespace opentelemetry::common;
namespace nostd = opentelemetry::nostd;

using M = std::map<std::string, std::string>;

Expand Down
1 change: 0 additions & 1 deletion sdk/test/metrics/attributes_hashmap_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <functional>

using namespace opentelemetry::sdk::metrics;
namespace nostd = opentelemetry::nostd;

TEST(AttributesHashMap, BasicTests)
{
Expand Down
1 change: 0 additions & 1 deletion sdk/test/metrics/sync_metric_storage_counter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
using namespace opentelemetry::sdk::metrics;
using namespace opentelemetry::common;
using M = std::map<std::string, std::string>;
namespace nostd = opentelemetry::nostd;

class WritableMetricStorageTestFixture : public ::testing::TestWithParam<AggregationTemporality>
{};
Expand Down
1 change: 0 additions & 1 deletion sdk/test/metrics/sync_metric_storage_histogram_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
using namespace opentelemetry::sdk::metrics;
using namespace opentelemetry::common;
using M = std::map<std::string, std::string>;
namespace nostd = opentelemetry::nostd;

class WritableMetricStorageHistogramTestFixture
: public ::testing::TestWithParam<AggregationTemporality>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
using namespace opentelemetry::sdk::metrics;
using namespace opentelemetry::common;
using M = std::map<std::string, std::string>;
namespace nostd = opentelemetry::nostd;

class WritableMetricStorageTestFixture : public ::testing::TestWithParam<AggregationTemporality>
{};
Expand Down
1 change: 0 additions & 1 deletion sdk/test/trace/tracer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ using opentelemetry::common::SystemTimestamp;
namespace nostd = opentelemetry::nostd;
namespace common = opentelemetry::common;
namespace trace_api = opentelemetry::trace;
using opentelemetry::common::KeyValueIterableView;
using opentelemetry::exporter::memory::InMemorySpanData;
using opentelemetry::exporter::memory::InMemorySpanExporter;
using opentelemetry::trace::SpanContext;
Expand Down

0 comments on commit cd1f9fc

Please sign in to comment.