Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/clang-tidy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
matrix:
include:
- cmake_options: all-options-abiv1-preview
warning_limit: 269
warning_limit: 240
- cmake_options: all-options-abiv2-preview
warning_limit: 279
warning_limit: 250
env:
CC: /usr/bin/clang-22
CXX: /usr/bin/clang++-22
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ Increment the:
* [CODE HEALTH] Fix clang-tidy bugprone-unchecked-string-to-number-conversion warnings
[#4216](https://github.com/open-telemetry/opentelemetry-cpp/pull/4216)

* [CODE HEALTH] Fix clang-tidy misc-override-with-different-visibility warnings
[#4215](https://github.com/open-telemetry/opentelemetry-cpp/pull/4215)

## [1.27.0] 2026-05-13

* [RELEASE] Bump main branch to 1.27.0-dev
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ class HttpTraceContext : public context::propagation::TextMapPropagator
return ExtractContextFromTraceHeaders(trace_parent, trace_state);
}

public:
bool Fields(nostd::function_ref<bool(nostd::string_view)> callback) const noexcept override
{
return (callback(kTraceParent) && callback(kTraceState));
Expand Down
2 changes: 2 additions & 0 deletions api/test/logs/logger_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ TEST(Logger, EventLogMethodOverloads)
// Define a basic Logger class
class TestLogger : public Logger
{
public:
const nostd::string_view GetName() noexcept override { return "test logger"; }

using Logger::CreateLogRecord;
Expand Down Expand Up @@ -459,6 +460,7 @@ class EnablementAwareTestLogger : public Logger
// Define a basic LoggerProvider class that returns an instance of the logger class defined above
class TestProvider : public LoggerProvider
{
public:
nostd::shared_ptr<Logger> GetLogger(nostd::string_view /* logger_name */,
nostd::string_view /* library_name */,
nostd::string_view /* library_version */,
Expand Down
1 change: 1 addition & 0 deletions api/test/logs/provider_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ namespace nostd = opentelemetry::nostd;

class TestProvider : public LoggerProvider
{
public:
nostd::shared_ptr<Logger> GetLogger(
nostd::string_view /* logger_name */,
nostd::string_view /* library_name */,
Expand Down
2 changes: 1 addition & 1 deletion api/test/trace/provider_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace nostd = opentelemetry::nostd;

class TestProvider : public TracerProvider
{

public:
#if OPENTELEMETRY_ABI_VERSION_NO >= 2
nostd::shared_ptr<Tracer> GetTracer(
nostd::string_view /* name */,
Expand Down
2 changes: 1 addition & 1 deletion examples/configuration/custom_pull_metric_exporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ class CustomPullMetricExporter : public opentelemetry::sdk::metrics::MetricReade
opentelemetry::sdk::metrics::AggregationTemporality GetAggregationTemporality(
opentelemetry::sdk::metrics::InstrumentType instrument_type) const noexcept override;

private:
bool OnForceFlush(std::chrono::microseconds timeout) noexcept override;

bool OnShutDown(std::chrono::microseconds timeout) noexcept override;

void OnInitialized() noexcept override;

private:
std::string comment_;
};
5 changes: 5 additions & 0 deletions ext/test/http/curl_http_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class CustomEventHandler : public http_client::EventHandler

class GetEventHandler : public CustomEventHandler
{
public:
void OnResponse(http_client::Response &response) noexcept override
{
ASSERT_EQ(200, response.GetStatusCode());
Expand All @@ -83,6 +84,7 @@ class GetEventHandler : public CustomEventHandler

class PostEventHandler : public CustomEventHandler
{
public:
void OnResponse(http_client::Response &response) noexcept override
{
ASSERT_EQ(200, response.GetStatusCode());
Expand Down Expand Up @@ -120,6 +122,7 @@ class FinishInCallbackHandler : public CustomEventHandler

class RetryEventHandler : public CustomEventHandler
{
public:
void OnResponse(http_client::Response &response) noexcept override
{
ASSERT_EQ(429, response.GetStatusCode());
Expand All @@ -145,6 +148,7 @@ class BasicCurlHttpTests : public ::testing::Test, public HTTP_SERVER_NS::HttpRe
public:
BasicCurlHttpTests() : is_setup_(false), is_running_(false) {}

protected:
void SetUp() override
{
if (is_setup_.exchange(true))
Expand Down Expand Up @@ -173,6 +177,7 @@ class BasicCurlHttpTests : public ::testing::Test, public HTTP_SERVER_NS::HttpRe
is_running_ = false;
}

public:
int onHttpRequest(HTTP_SERVER_NS::HttpRequest const &request,
HTTP_SERVER_NS::HttpResponse &response) override
{
Expand Down
4 changes: 3 additions & 1 deletion sdk/include/opentelemetry/sdk/logs/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Logger final : public opentelemetry::logs::Logger
return GetInstrumentationScope();
}

private:
protected:
bool EnabledImplementation(opentelemetry::logs::Severity severity,
const opentelemetry::logs::EventId &event_id) const noexcept override;

Expand All @@ -89,6 +89,8 @@ class Logger final : public opentelemetry::logs::Logger
opentelemetry::logs::Severity severity,
const opentelemetry::logs::EventId &event_id) const noexcept override;
#endif // OPENTELEMETRY_ABI_VERSION_NO >= 2

private:
// The name of this logger
std::string logger_name_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ class AlignedHistogramBucketExemplarReservoir : public FixedSizeExemplarReservoi
return static_cast<int>(max_size);
}

private:
public:
void reset() override
{
// Do nothing
}

private:
std::vector<double> boundaries_;
};
};
Expand Down
2 changes: 2 additions & 0 deletions sdk/include/opentelemetry/sdk/metrics/view/predicate.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ class ExactPredicate : public Predicate

class MatchEverythingPattern : public Predicate
{
public:
bool Match(opentelemetry::nostd::string_view /* str */) const noexcept override { return true; }
};

class MatchNothingPattern : public Predicate
{
public:
bool Match(opentelemetry::nostd::string_view /* str */) const noexcept override { return false; }
};
} // namespace metrics
Expand Down
1 change: 1 addition & 0 deletions sdk/test/logs/logger_provider_sdk_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ class DummyLogRecordable final : public opentelemetry::sdk::logs::Recordable

class DummyProcessor : public LogRecordProcessor
{
public:
std::unique_ptr<Recordable> MakeRecordable() noexcept override
{
return std::unique_ptr<Recordable>(new DummyLogRecordable());
Expand Down
1 change: 1 addition & 0 deletions sdk/test/logs/logger_provider_set_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ namespace logs_sdk = opentelemetry::sdk::logs;

class TestProvider : public LoggerProvider
{
public:
nostd::shared_ptr<Logger> GetLogger(
nostd::string_view /* logger_name */,
nostd::string_view /* library_name */,
Expand Down
2 changes: 1 addition & 1 deletion sdk/test/metrics/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ class MockMetricReader : public opentelemetry::sdk::metrics::MetricReader
opentelemetry::sdk::metrics::AggregationTemporality GetAggregationTemporality(
opentelemetry::sdk::metrics::InstrumentType) const noexcept override;

private:
bool OnForceFlush(std::chrono::microseconds) noexcept override;

bool OnShutDown(std::chrono::microseconds) noexcept override;

void OnInitialized() noexcept override;

private:
std::unique_ptr<opentelemetry::sdk::metrics::PushMetricExporter> exporter_;
};

Expand Down
2 changes: 1 addition & 1 deletion sdk/test/trace/tracer_provider_set_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace trace_sdk = opentelemetry::sdk::trace;

class TestProvider : public TracerProvider
{

public:
#if OPENTELEMETRY_ABI_VERSION_NO >= 2
nostd::shared_ptr<Tracer> GetTracer(
nostd::string_view /* name */,
Expand Down
Loading