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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ Increment the:
* [CODE HEALTH] Fix clang-tidy misc-use-internal-linkage warnings
[#3600](https://github.com/open-telemetry/opentelemetry-cpp/pull/3600)

* [CODE HEALTH] Fix clang-tidy macro to enum warnings
[#3922](https://github.com/open-telemetry/opentelemetry-cpp/pull/3922)

Important changes:

* [BUILD] Revisit EventLogger deprecation
Expand Down
2 changes: 2 additions & 0 deletions api/include/opentelemetry/common/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,10 @@

// Regex support
#if (__GNUC__ == 4 && (__GNUC_MINOR__ == 8 || __GNUC_MINOR__ == 9))
// NOLINTNEXTLINE(cppcoreguidelines-macro-to-enum)
# define OPENTELEMETRY_HAVE_WORKING_REGEX 0
#else
// NOLINTNEXTLINE(cppcoreguidelines-macro-to-enum)
# define OPENTELEMETRY_HAVE_WORKING_REGEX 1
#endif

Expand Down
3 changes: 3 additions & 0 deletions api/include/opentelemetry/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
#include "opentelemetry/detail/preprocessor.h"

#ifndef OPENTELEMETRY_ABI_VERSION_NO
// NOLINTNEXTLINE(cppcoreguidelines-macro-to-enum)
# define OPENTELEMETRY_ABI_VERSION_NO 1
#endif

// NOLINTBEGIN(cppcoreguidelines-macro-to-enum)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include the above OPENTELEMETRY_ABI_VERSION_NO definition in the // NOLINTBEGIN section too?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

#define OPENTELEMETRY_VERSION "1.26.0-dev"
#define OPENTELEMETRY_VERSION_MAJOR 1
#define OPENTELEMETRY_VERSION_MINOR 26
#define OPENTELEMETRY_VERSION_PATCH 0
// NOLINTEND(cppcoreguidelines-macro-to-enum)

#define OPENTELEMETRY_ABI_VERSION OPENTELEMETRY_STRINGIFY(OPENTELEMETRY_ABI_VERSION_NO)

Expand Down
4 changes: 0 additions & 4 deletions sdk/include/opentelemetry/sdk/logs/event_logger_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@

#include "opentelemetry/version.h"

// Define the maximum number of loggers that are allowed to be registered to the loggerprovider.
// TODO: Add link to logging spec once this is added to it
#define MAX_LOGGER_COUNT 100

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
Expand Down
4 changes: 0 additions & 4 deletions sdk/include/opentelemetry/sdk/logs/logger_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
#include "opentelemetry/sdk/resource/resource.h"
#include "opentelemetry/version.h"

// Define the maximum number of loggers that are allowed to be registered to the loggerprovider.
// TODO: Add link to logging spec once this is added to it
#define MAX_LOGGER_COUNT 100

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
Expand Down
13 changes: 0 additions & 13 deletions sdk/src/logs/logger_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,6 @@ opentelemetry::nostd::shared_ptr<opentelemetry::logs::Logger> LoggerProvider::Ge
}
}

// Check if creating a new logger would exceed the max number of loggers
// TODO: Remove the noexcept from the API's and SDK's GetLogger(~)
/*
if (loggers_.size() > MAX_LOGGER_COUNT)
{
#if __EXCEPTIONS
throw std::length_error("Number of loggers exceeds max count");
#else
std::terminate();
#endif
}
*/

std::unique_ptr<instrumentationscope::InstrumentationScope> lib =
instrumentationscope::InstrumentationScope::Create(library_name, library_version, schema_url,
attributes);
Expand Down
Loading