diff --git a/api/include/opentelemetry/common/macros.h b/api/include/opentelemetry/common/macros.h index ea233129f4..2ae408ddb3 100644 --- a/api/include/opentelemetry/common/macros.h +++ b/api/include/opentelemetry/common/macros.h @@ -9,45 +9,45 @@ /// \brief Declare class, variable or functions as deprecated /// usage: -/// OPENTELEMETRY_DEPRECATED_ATTR int a; -/// class OPENTELEMETRY_DEPRECATED_ATTR a; -/// OPENTELEMETRY_DEPRECATED_ATTR int a(); +/// OPENTELEMETRY_DEPRECATED int a; +/// class OPENTELEMETRY_DEPRECATED a; +/// OPENTELEMETRY_DEPRECATED int a(); /// usage: -/// OPENTELEMETRY_DEPRECATED_MSG("there is better choose") int a; +/// OPENTELEMETRY_DEPRECATED_MESSAGE("there is better choose") int a; /// class DEPRECATED_MSG("there is better choose") a; -/// OPENTELEMETRY_DEPRECATED_MSG("there is better choose") int a(); +/// OPENTELEMETRY_DEPRECATED_MESSAGE("there is better choose") int a(); /// #if defined(__cplusplus) && __cplusplus >= 201402L -# define OPENTELEMETRY_DEPRECATED_ATTR [[deprecated]] +# define OPENTELEMETRY_DEPRECATED [[deprecated]] #elif defined(__clang__) -# define OPENTELEMETRY_DEPRECATED_ATTR __attribute__((deprecated)) +# define OPENTELEMETRY_DEPRECATED __attribute__((deprecated)) #elif defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -# define OPENTELEMETRY_DEPRECATED_ATTR __attribute__((deprecated)) +# define OPENTELEMETRY_DEPRECATED __attribute__((deprecated)) #elif defined(_MSC_VER) && _MSC_VER >= 1400 // vs 2005 or higher # if _MSC_VER >= 1910 && defined(_MSVC_LANG) && _MSVC_LANG >= 201703L -# define OPENTELEMETRY_DEPRECATED_ATTR [[deprecated]] +# define OPENTELEMETRY_DEPRECATED [[deprecated]] # else -# define OPENTELEMETRY_DEPRECATED_ATTR __declspec(deprecated) +# define OPENTELEMETRY_DEPRECATED __declspec(deprecated) # endif #else -# define OPENTELEMETRY_DEPRECATED_ATTR +# define OPENTELEMETRY_DEPRECATED #endif #if defined(__cplusplus) && __cplusplus >= 201402L -# define OPENTELEMETRY_DEPRECATED_MSG(msg) [[deprecated(msg)]] +# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) [[deprecated(msg)]] #elif defined(__clang__) -# define OPENTELEMETRY_DEPRECATED_MSG(msg) __attribute__((deprecated(msg))) +# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) __attribute__((deprecated(msg))) #elif defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) -# define OPENTELEMETRY_DEPRECATED_MSG(msg) __attribute__((deprecated(msg))) +# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) __attribute__((deprecated(msg))) #elif defined(_MSC_VER) && _MSC_VER >= 1400 // vs 2005 or higher # if _MSC_VER >= 1910 && defined(_MSVC_LANG) && _MSVC_LANG >= 201703L -# define OPENTELEMETRY_DEPRECATED_MSG(msg) [[deprecated(msg)]] +# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) [[deprecated(msg)]] # else -# define OPENTELEMETRY_DEPRECATED_MSG(msg) __declspec(deprecated(msg)) +# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) __declspec(deprecated(msg)) # endif #else -# define OPENTELEMETRY_DEPRECATED_MSG(msg) +# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) #endif /// \brief Declare variable as maybe unused diff --git a/api/include/opentelemetry/logs/logger.h b/api/include/opentelemetry/logs/logger.h index 29b7dc4f80..c9c62304ab 100644 --- a/api/include/opentelemetry/logs/logger.h +++ b/api/include/opentelemetry/logs/logger.h @@ -66,7 +66,7 @@ class Logger trace::TraceFlags trace_flags, common::SystemTimestamp timestamp) noexcept = 0; - OPENTELEMETRY_DEPRECATED_MSG("resource is removed and ignored") + OPENTELEMETRY_DEPRECATED_MESSAGE("resource is removed and ignored") void Log(Severity severity, nostd::string_view name, nostd::string_view body, @@ -104,7 +104,7 @@ class Logger class U, nostd::enable_if_t::value> * = nullptr, nostd::enable_if_t::value> * = nullptr> - OPENTELEMETRY_DEPRECATED_MSG("resource is removed and ignored") + OPENTELEMETRY_DEPRECATED_MESSAGE("resource is removed and ignored") void Log(Severity severity, nostd::string_view name, nostd::string_view body, @@ -134,7 +134,7 @@ class Logger trace_id, span_id, trace_flags, timestamp); } - OPENTELEMETRY_DEPRECATED_MSG("resource is removed and ignored") + OPENTELEMETRY_DEPRECATED_MESSAGE("resource is removed and ignored") void Log(Severity severity, nostd::string_view name, nostd::string_view body,