Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade proto to v0.17.0, update log data model #1383

Merged
merged 11 commits into from
May 17, 2022
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
42 changes: 21 additions & 21 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
[submodule "third_party/prometheus-cpp"]
path = third_party/prometheus-cpp
url = https://github.com/jupp0r/prometheus-cpp
branch = master
path = third_party/prometheus-cpp
url = https://github.com/jupp0r/prometheus-cpp
branch = master

[submodule "tools/vcpkg"]
path = tools/vcpkg
url = https://github.com/Microsoft/vcpkg
branch = master
path = tools/vcpkg
url = https://github.com/Microsoft/vcpkg
branch = master

[submodule "third_party/ms-gsl"]
path = third_party/ms-gsl
url = https://github.com/microsoft/GSL
branch = master
path = third_party/ms-gsl
url = https://github.com/microsoft/GSL
branch = main
lalitb marked this conversation as resolved.
Show resolved Hide resolved

[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest
branch = master
path = third_party/googletest
url = https://github.com/google/googletest
branch = main

[submodule "third_party/benchmark"]
path = third_party/benchmark
url = https://github.com/google/benchmark
branch = master
path = third_party/benchmark
url = https://github.com/google/benchmark
branch = main

[submodule "third_party/opentelemetry-proto"]
path = third_party/opentelemetry-proto
url = https://github.com/open-telemetry/opentelemetry-proto
branch = master
path = third_party/opentelemetry-proto
url = https://github.com/open-telemetry/opentelemetry-proto
branch = main

[submodule "third_party/nlohmann-json"]
path = third_party/nlohmann-json
url = https://github.com/nlohmann/json
branch = master
path = third_party/nlohmann-json
url = https://github.com/nlohmann/json
branch = master
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Increment the:

## [Unreleased]

* [PROTOCOL \& LOGS] Upgrade proto to v0.17.0, update log data model ([#1383](https://github.com/open-telemetry/opentelemetry-cpp/pull/1383))

## [1.3.0] 2022-04-11

* [ETW EXPORTER] ETW provider handle cleanup ([#1322](https://github.com/open-telemetry/opentelemetry-cpp/pull/1322))
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ if(WIN32)
option(WITH_ETW "Whether to include the ETW Exporter in the SDK" ON)
endif(WIN32)

# Do not convert deprecated message to error
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
add_compile_options(-Wno-error=deprecated-declarations)
endif()

option(
WITH_API_ONLY
"Only build the API (use as a header-only library). Overrides WITH_EXAMPLES and all options to enable exporters"
Expand Down
49 changes: 49 additions & 0 deletions api/include/opentelemetry/common/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@

#include "opentelemetry/version.h"

#if !defined(OPENTELEMETRY_LIKELY_IF) && defined(__cplusplus)
// GCC 9 has likely attribute but do not support declare it at the beginning of statement
# if defined(__has_cpp_attribute) && (defined(__clang__) || !defined(__GNUC__) || __GNUC__ > 9)
# if __has_cpp_attribute(likely)
# define OPENTELEMETRY_LIKELY_IF(...) \
if (__VA_ARGS__) \
[[likely]]
# endif
# endif
#endif
#if !defined(OPENTELEMETRY_LIKELY_IF) && (defined(__clang__) || defined(__GNUC__))
# define OPENTELEMETRY_LIKELY_IF(...) if (__builtin_expect(!!(__VA_ARGS__), true))
#endif
#ifndef OPENTELEMETRY_LIKELY_IF
# define OPENTELEMETRY_LIKELY_IF(...) if (__VA_ARGS__)
#endif

/// \brief Declare variable as maybe unused
/// usage:
/// OPENTELEMETRY_MAYBE_UNUSED int a;
Expand Down Expand Up @@ -40,3 +57,35 @@
# endif
# endif
#endif

#if defined(__cplusplus) && __cplusplus >= 201402L
# define OPENTELEMETRY_DEPRECATED [[deprecated]]
#elif defined(__clang__)
# define OPENTELEMETRY_DEPRECATED __attribute__((deprecated))
#elif defined(__GNUC__)
# define OPENTELEMETRY_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
# if _MSC_VER >= 1910 && defined(_MSVC_LANG) && _MSVC_LANG >= 201703L
# define OPENTELEMETRY_DEPRECATED [[deprecated]]
# else
# define OPENTELEMETRY_DEPRECATED __declspec(deprecated)
# endif
#else
# define OPENTELEMETRY_DEPRECATED
#endif

#if defined(__cplusplus) && __cplusplus >= 201402L
# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) [[deprecated(msg)]]
#elif defined(__clang__)
# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) __attribute__((deprecated(msg)))
#elif defined(__GNUC__)
# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) __attribute__((deprecated(msg)))
#elif defined(_MSC_VER)
# if _MSC_VER >= 1910 && defined(_MSVC_LANG) && _MSVC_LANG >= 201703L
# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) [[deprecated(msg)]]
# else
# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) __declspec(deprecated(msg))
# endif
#else
# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg)
#endif
Loading