Skip to content

Commit 280f546

Browse files
authored
Upgrade proto to v0.17.0, update log data model (#1383)
1 parent 1e25d58 commit 280f546

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+493
-305
lines changed

.gitmodules

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
[submodule "third_party/prometheus-cpp"]
2-
path = third_party/prometheus-cpp
3-
url = https://github.com/jupp0r/prometheus-cpp
4-
branch = master
2+
path = third_party/prometheus-cpp
3+
url = https://github.com/jupp0r/prometheus-cpp
4+
branch = master
55

66
[submodule "tools/vcpkg"]
7-
path = tools/vcpkg
8-
url = https://github.com/Microsoft/vcpkg
9-
branch = master
7+
path = tools/vcpkg
8+
url = https://github.com/Microsoft/vcpkg
9+
branch = master
1010

1111
[submodule "third_party/ms-gsl"]
12-
path = third_party/ms-gsl
13-
url = https://github.com/microsoft/GSL
14-
branch = master
12+
path = third_party/ms-gsl
13+
url = https://github.com/microsoft/GSL
14+
branch = main
1515

1616
[submodule "third_party/googletest"]
17-
path = third_party/googletest
18-
url = https://github.com/google/googletest
19-
branch = master
17+
path = third_party/googletest
18+
url = https://github.com/google/googletest
19+
branch = main
2020

2121
[submodule "third_party/benchmark"]
22-
path = third_party/benchmark
23-
url = https://github.com/google/benchmark
24-
branch = master
22+
path = third_party/benchmark
23+
url = https://github.com/google/benchmark
24+
branch = main
2525

2626
[submodule "third_party/opentelemetry-proto"]
27-
path = third_party/opentelemetry-proto
28-
url = https://github.com/open-telemetry/opentelemetry-proto
29-
branch = master
27+
path = third_party/opentelemetry-proto
28+
url = https://github.com/open-telemetry/opentelemetry-proto
29+
branch = main
3030

3131
[submodule "third_party/nlohmann-json"]
32-
path = third_party/nlohmann-json
33-
url = https://github.com/nlohmann/json
34-
branch = master
32+
path = third_party/nlohmann-json
33+
url = https://github.com/nlohmann/json
34+
branch = master

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Increment the:
1515

1616
## [Unreleased]
1717

18+
* [PROTOCOL \& LOGS] Upgrade proto to v0.17.0, update log data model ([#1383](https://github.com/open-telemetry/opentelemetry-cpp/pull/1383))
19+
1820
## [1.3.0] 2022-04-11
1921

2022
* [ETW EXPORTER] ETW provider handle cleanup ([#1322](https://github.com/open-telemetry/opentelemetry-cpp/pull/1322))

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ if(WIN32)
173173
option(WITH_ETW "Whether to include the ETW Exporter in the SDK" ON)
174174
endif(WIN32)
175175

176+
# Do not convert deprecated message to error
177+
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
178+
add_compile_options(-Wno-error=deprecated-declarations)
179+
endif()
180+
176181
option(
177182
WITH_API_ONLY
178183
"Only build the API (use as a header-only library). Overrides WITH_EXAMPLES and all options to enable exporters"

api/include/opentelemetry/common/macros.h

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@
77

88
#include "opentelemetry/version.h"
99

10+
#if !defined(OPENTELEMETRY_LIKELY_IF) && defined(__cplusplus)
11+
// GCC 9 has likely attribute but do not support declare it at the beginning of statement
12+
# if defined(__has_cpp_attribute) && (defined(__clang__) || !defined(__GNUC__) || __GNUC__ > 9)
13+
# if __has_cpp_attribute(likely)
14+
# define OPENTELEMETRY_LIKELY_IF(...) \
15+
if (__VA_ARGS__) \
16+
[[likely]]
17+
# endif
18+
# endif
19+
#endif
20+
#if !defined(OPENTELEMETRY_LIKELY_IF) && (defined(__clang__) || defined(__GNUC__))
21+
# define OPENTELEMETRY_LIKELY_IF(...) if (__builtin_expect(!!(__VA_ARGS__), true))
22+
#endif
23+
#ifndef OPENTELEMETRY_LIKELY_IF
24+
# define OPENTELEMETRY_LIKELY_IF(...) if (__VA_ARGS__)
25+
#endif
26+
1027
/// \brief Declare variable as maybe unused
1128
/// usage:
1229
/// OPENTELEMETRY_MAYBE_UNUSED int a;
@@ -40,3 +57,35 @@
4057
# endif
4158
# endif
4259
#endif
60+
61+
#if defined(__cplusplus) && __cplusplus >= 201402L
62+
# define OPENTELEMETRY_DEPRECATED [[deprecated]]
63+
#elif defined(__clang__)
64+
# define OPENTELEMETRY_DEPRECATED __attribute__((deprecated))
65+
#elif defined(__GNUC__)
66+
# define OPENTELEMETRY_DEPRECATED __attribute__((deprecated))
67+
#elif defined(_MSC_VER)
68+
# if _MSC_VER >= 1910 && defined(_MSVC_LANG) && _MSVC_LANG >= 201703L
69+
# define OPENTELEMETRY_DEPRECATED [[deprecated]]
70+
# else
71+
# define OPENTELEMETRY_DEPRECATED __declspec(deprecated)
72+
# endif
73+
#else
74+
# define OPENTELEMETRY_DEPRECATED
75+
#endif
76+
77+
#if defined(__cplusplus) && __cplusplus >= 201402L
78+
# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) [[deprecated(msg)]]
79+
#elif defined(__clang__)
80+
# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) __attribute__((deprecated(msg)))
81+
#elif defined(__GNUC__)
82+
# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) __attribute__((deprecated(msg)))
83+
#elif defined(_MSC_VER)
84+
# if _MSC_VER >= 1910 && defined(_MSVC_LANG) && _MSVC_LANG >= 201703L
85+
# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) [[deprecated(msg)]]
86+
# else
87+
# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) __declspec(deprecated(msg))
88+
# endif
89+
#else
90+
# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg)
91+
#endif

0 commit comments

Comments
 (0)