Skip to content

Commit d7b03e8

Browse files
authored
Merge main into async changes (open-telemetry#1411)
1 parent 0aebd6e commit d7b03e8

File tree

77 files changed

+1437
-553
lines changed

Some content is hidden

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

77 files changed

+1437
-553
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: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,62 @@ Increment the:
2020
* [EXT] `curl::HttpClient` use `curl_multi_handle` instead of creating a thread
2121
for every request and it's able to reuse connections now. ([#1317](https://github.com/open-telemetry/opentelemetry-cpp/pull/1317))
2222

23+
## [1.4.0] 2022-05-17
24+
25+
* [API SDK] Upgrade proto to v0.17.0, update log data model ([#1383](https://github.com/open-telemetry/opentelemetry-cpp/pull/1383))
26+
* [BUILD] Alpine image ([#1382](https://github.com/open-telemetry/opentelemetry-cpp/pull/1382))
27+
* [LOGS SDK] Get span_id from context when Logger::Log received invalid span_id
28+
([#1398](https://github.com/open-telemetry/opentelemetry-cpp/pull/1398))
29+
* [METRICS SDK] Connect async storage with async instruments ([#1388](https://github.com/open-telemetry/opentelemetry-cpp/pull/1388))
30+
* [DOCS] Getting started document using ostream exporter ([#1394](https://github.com/open-telemetry/opentelemetry-cpp/pull/1394))
31+
* [BUILD] Fix missing link to nlohmann_json ([#1390](https://github.com/open-telemetry/opentelemetry-cpp/pull/1390))
32+
* [SDK] Fix sharing resource in batched exported spans ([#1386](https://github.com/open-telemetry/opentelemetry-cpp/pull/1386))
33+
* [PROTOCOL \& LOGS] Upgrade proto to v0.17.0, update log data model ([#1383](https://github.com/open-telemetry/opentelemetry-cpp/pull/1383))
34+
* [METRICS SDK] Remove un-necessary files. ([#1379](https://github.com/open-telemetry/opentelemetry-cpp/pull/1379))
35+
* [EXPORTER] Prometheus exporter meters and instrument name ([#1378](https://github.com/open-telemetry/opentelemetry-cpp/pull/1378))
36+
* [API] Add noexcept/const qualifier at missing places for Trace API. ([#1374](https://github.com/open-telemetry/opentelemetry-cpp/pull/1374))
37+
* [SDK] Fix empty tracestate header propagation ([#1373](https://github.com/open-telemetry/opentelemetry-cpp/pull/1373))
38+
* [METRICS SDK] Reuse temporal metric storage for sync storage ([#1369](https://github.com/open-telemetry/opentelemetry-cpp/pull/1369))
39+
* [SDK] Fix baggage propagation for empty/invalid baggage context ([#1367](https://github.com/open-telemetry/opentelemetry-cpp/pull/1367))
40+
* [BUILD] Export opentelemetry_otlp_recordable ([#1365](https://github.com/open-telemetry/opentelemetry-cpp/pull/1365))
41+
* [TESTS] Disable test on prometheus-cpp which not need ([#1363](https://github.com/open-telemetry/opentelemetry-cpp/pull/1363))
42+
* [METRICS] Fix class member initialization order ([#1360](https://github.com/open-telemetry/opentelemetry-cpp/pull/1360))
43+
* [METRICS SDK] Simplify SDK Configuration: Use View with default aggregation if
44+
no matching View is configured
45+
([#1358](https://github.com/open-telemetry/opentelemetry-cpp/pull/1358))
46+
* [BUILD] Add missing include guard ([#1357](https://github.com/open-telemetry/opentelemetry-cpp/pull/1357))
47+
* [ETW EXPORTER] Fix scalar delete against array ([#1356](https://github.com/open-telemetry/opentelemetry-cpp/pull/1356))
48+
* [ETW EXPORTER] Conditional include for codecvt header ([#1355](https://github.com/open-telemetry/opentelemetry-cpp/pull/1355))
49+
* [BUILD] Use latest TraceLoggingDynamic.h ([#1354](https://github.com/open-telemetry/opentelemetry-cpp/pull/1354))
50+
* [SDK] Add explicit type cast in baggage UrlDecode ([#1353](https://github.com/open-telemetry/opentelemetry-cpp/pull/1353))
51+
* [METRICS SDK] Remove exporter registration to meter provider ([#1350](https://github.com/open-telemetry/opentelemetry-cpp/pull/1350))
52+
* [METRICS SDK] Fix output time in metrics OStream exporter ([#1346](https://github.com/open-telemetry/opentelemetry-cpp/pull/1346))
53+
* [BUILD] ostream metrics cmake ([#1344](https://github.com/open-telemetry/opentelemetry-cpp/pull/1344))
54+
* [BUILD] Link `opentelemetry_ext` with `opentelemetry_api` ([#1336](https://github.com/open-telemetry/opentelemetry-cpp/pull/1336))
55+
* [METRICS SDK] Enable metric collection for Async Instruments - Delta and
56+
Cumulative
57+
([#1334](https://github.com/open-telemetry/opentelemetry-cpp/pull/1334))
58+
* [BUILD] Dependencies image as artifact ([#1333](https://github.com/open-telemetry/opentelemetry-cpp/pull/1333))
59+
* [EXAMPLE] Prometheus example ([#1332](https://github.com/open-telemetry/opentelemetry-cpp/pull/1332))
60+
* [METRICS EXPORTER] Prometheus exporter ([#1331](https://github.com/open-telemetry/opentelemetry-cpp/pull/1331))
61+
* [METRICS] Metrics histogram example ([#1330](https://github.com/open-telemetry/opentelemetry-cpp/pull/1330))
62+
* [TESTS] Replace deprecated googletest API ([#1327](https://github.com/open-telemetry/opentelemetry-cpp/pull/1327))
63+
* [BUILD] Fix Ninja path ([#1326](https://github.com/open-telemetry/opentelemetry-cpp/pull/1326))
64+
* [API] Update yield logic for ARM processor ([#1325](https://github.com/open-telemetry/opentelemetry-cpp/pull/1325))
65+
* [BUILD] Fix metrics compiler warnings ([#1328](https://github.com/open-telemetry/opentelemetry-cpp/pull/1328))
66+
* [METRICS SDK] Implement Merge and Diff operation for Histogram Aggregation ([#1303](https://github.com/open-telemetry/opentelemetry-cpp/pull/1303))
67+
68+
Notes:
69+
70+
While opentelemetry-cpp Logs are still in experimental stage,
71+
[#1383](https://github.com/open-telemetry/opentelemetry-cpp/pull/1383) updated
72+
opentelemetry-proto to 0.17.0, which includes some breaking change in the
73+
protocol, like
74+
[this](https://github.com/open-telemetry/opentelemetry-proto/pull/373). This
75+
makes `name` parameter for our log API unnecessary. However, this parameter is
76+
marked deprecated instead of being removed in this release, and it will be
77+
removed in future release.
78+
2379
## [1.3.0] 2022-04-11
2480

2581
* [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"

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ The C++ [OpenTelemetry](https://opentelemetry.io/) client.
1313
| Signal | Status | Project |
1414
| ------- | ---------------------- | ------------------------------------------------------------------------ |
1515
| Traces | Public Release | N/A |
16-
| Metrics | Development [1] | N/A |
16+
| Metrics | Alpha [1] | N/A |
1717
| Logs | Experimental [2] | N/A |
1818

19-
* [1]: The development of the metrics API and SDK based on new stable
20-
specification is ongoing. The timelines would be available in release
21-
milestone. The earlier implementation (based on old specification) can be
22-
included in build by setting `ENABLE_METRICS_PREVIEW` preprocessor macro,
23-
and is included under `*/_metrics/*` directory. This would be eventually
24-
removed once the ongoing implemetation is stable.
19+
* [1]: The metric collection pipeline is available for testing purpose. Not
20+
ready for production. The earlier implementation (based on old
21+
specification) can be included in build by setting
22+
`ENABLE_METRICS_PREVIEW` preprocessor macro, and is included under
23+
`*/_metrics/*` directory. This would be eventually removed once the
24+
ongoing implemetation is stable.
2525
* [2]: The current Log Signal Implementation is Experimental, and will change as
2626
the current OpenTelemetry Log specification matures. The current
2727
implementation can be included in build by setting `ENABLE_LOGS_PREVIEW`

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)