Skip to content

Commit 78b9983

Browse files
committed
WL#16207: Update bundled OTel API headers to 1.12.0
1 parent 497f15d commit 78b9983

File tree

206 files changed

+1639
-933
lines changed

Some content is hidden

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

206 files changed

+1639
-933
lines changed

jdbc/extra/otel/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SET(OPENTELEMETRY_CPP_TAG "opentelemetry-cpp-1.10.0" CACHE INTERNAL "")
1+
SET(OPENTELEMETRY_CPP_TAG "opentelemetry-cpp-1.12.0" CACHE INTERNAL "")
22

33
add_library(otel_api INTERFACE)
44

jdbc/extra/otel/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ our copy:
1212
folder.
1313

1414
3. Inside opentelemtry-cpp-X.Y.Z delete everything except api/ subfolder
15-
and LICENSE file.
15+
and LICENSE, README.md files.
1616

1717
4. Inside CMakeLists.txt in this folder update OPENTELEMETRY_CPP_TAG
1818
variable:

jdbc/extra/otel/opentelemetry-cpp-1.10.0/api/include/opentelemetry/metrics/meter_provider.h

Lines changed: 0 additions & 39 deletions
This file was deleted.

jdbc/extra/otel/opentelemetry-cpp-1.10.0/README.md renamed to jdbc/extra/otel/opentelemetry-cpp-1.12.0/README.md

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,20 @@ The C++ [OpenTelemetry](https://opentelemetry.io/) client.
1010

1111
## Project Status
1212

13-
| Signal | Status | Project |
14-
| ------- | ----------------------- | ------------------------------------------------------------------------ |
15-
| Traces | Public Release | N/A |
16-
| Metrics | Public Release | N/A |
17-
| Logs | Experimental [1] | [Release Milestone](https://github.com/open-telemetry/opentelemetry-cpp/milestone/18)|
13+
**Stable** across all 3 signals i.e. `Logs`, `Metrics`, and `Traces`.
1814

19-
* [1]: The current Log Signal Implementation is Experimental, and will change as
20-
the current OpenTelemetry Log specification matures. The current
21-
implementation can be included in build by setting `ENABLE_LOGS_PREVIEW`
22-
preprocessor macro.
15+
See [Spec Compliance
16+
Matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md)
17+
to understand which portions of the specification has been implemented in this
18+
repo.
2319

2420
## Supported C++ Versions
2521

2622
Code shipped from this repository generally supports the following versions of
2723
C++ standards:
2824

29-
* ISO/IEC 14882:2011 (C++11, C++0x)
30-
* ISO/IEC 14882:2014 (C++14, C++1y)
31-
* ISO/IEC 14882:2017 (C++17, C++1z)
25+
* ISO/IEC 14882:2014 (C++14)
26+
* ISO/IEC 14882:2017 (C++17)
3227
* ISO/IEC 14882:2020 (C++20)
3328

3429
Any exceptions to this are noted in the individual `README.md` files.
@@ -43,19 +38,13 @@ of the current project.
4338

4439
| Platform | Build type |
4540
|---------------------------------------------------------------------|---------------|
46-
| ubuntu-22.04 (GCC - 10, 12) | CMake, Bazel |
47-
| ubuntu-20.04 (GCC 4.8 with -std=c++11 flag) | CMake [1] |
48-
| ubuntu-20.04 (GCC 9.4.0) | CMake, Bazel |
49-
| ubuntu-20.04 (Default GCC Compiler - 9.4.0 with -std=c++20 flags) | CMake, Bazel |
50-
| macOS 12.0 (Xcode 14.2) | Bazel |
41+
| ubuntu-22.04 (GCC 10, GCC 12, Clang 14) | CMake, Bazel |
42+
| ubuntu-20.04 (GCC 9.4.0 - default compiler) | CMake, Bazel |
43+
| ubuntu-20.04 (GCC 9.4.0 with -std=c++14/17/20 flags) | CMake, Bazel |
44+
| macOS 12.7 (Xcode 14.2) | Bazel |
5145
| Windows Server 2019 (Visual Studio Enterprise 2019) | CMake, Bazel |
5246
| Windows Server 2022 (Visual Studio Enterprise 2022) | CMake |
5347

54-
[1]: Bazel build is disabled for GCC 4.8, as gRPC library 1.38 and above
55-
(required by OTLP exporter) don't build with this compiler. See gRPC [official
56-
support](https://grpc.io/docs/#official-support) document. CMake build doesn't
57-
build OTLP exporter with GCC 4.8.
58-
5948
In general, the code shipped from this repository should build on all platforms
6049
having C++ compiler with [supported C++ standards](#supported-c-versions).
6150

@@ -124,8 +113,6 @@ Maintainer/Approver/Triager](https://github.com/open-telemetry/community/blob/ma
124113

125114
## Release Schedule
126115

127-
Refer to [project status](#project-status) for current status of the project.
128-
129116
See the [release
130117
notes](https://github.com/open-telemetry/opentelemetry-cpp/releases) for
131118
existing releases.

jdbc/extra/otel/opentelemetry-cpp-1.10.0/api/BUILD renamed to jdbc/extra/otel/opentelemetry-cpp-1.12.0/api/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ cc_library(
2222
deps = select({
2323
":with_external_abseil": [
2424
"@com_google_absl//absl/base",
25+
"@com_google_absl//absl/strings",
2526
"@com_google_absl//absl/types:variant",
2627
],
2728
"//conditions:default": [],

jdbc/extra/otel/opentelemetry-cpp-1.10.0/api/CMakeLists.txt renamed to jdbc/extra/otel/opentelemetry-cpp-1.12.0/api/CMakeLists.txt

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ if(OPENTELEMETRY_INSTALL)
1717
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1818
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
1919

20-
set(LOGS_EXCLUDE_PATTERN "")
21-
if(NOT WITH_LOGS_PREVIEW)
22-
set(LOGS_EXCLUDE_PATTERN "logs")
23-
endif()
24-
2520
install(
2621
DIRECTORY include/opentelemetry
2722
DESTINATION include
@@ -33,8 +28,9 @@ if(OPENTELEMETRY_INSTALL)
3328
DIRECTORY include/opentelemetry
3429
DESTINATION include
3530
FILES_MATCHING
36-
PATTERN "*.h"
37-
PATTERN "${LOGS_EXCLUDE_PATTERN}" EXCLUDE)
31+
PATTERN "*.h")
32+
33+
unset(TARGET_DEPS)
3834
endif()
3935

4036
if(BUILD_TESTING)
@@ -47,26 +43,44 @@ if(WITH_NO_DEPRECATED_CODE)
4743
endif()
4844

4945
if(TELEMETRY_WITH_ABSEIL)
50-
IF(WITH_PROTOBUF STREQUAL "bundled")
51-
INCLUDE_DIRECTORIES(BEFORE SYSTEM
52-
"${BUNDLED_PROTO_SRCDIR}"
53-
"${BUNDLED_ABSEIL_SRCDIR}")
54-
ELSE()
55-
find_package(absl CONFIG REQUIRED)
56-
ENDIF()
57-
5846
target_compile_definitions(opentelemetry_api INTERFACE HAVE_ABSEIL)
5947
target_link_libraries(
6048
opentelemetry_api INTERFACE absl::bad_variant_access absl::any absl::base
6149
absl::bits absl::city)
62-
50+
list(APPEND TARGET_DEPS "absl_bad_variant_access" "absl_any absl_base"
51+
"absl_bits" "absl_city")
6352
endif()
6453

65-
if(WITH_STL)
66-
message(STATUS "Building with standard library types...")
67-
target_compile_definitions(opentelemetry_api INTERFACE HAVE_CPP_STDLIB)
54+
if(WITH_STL STREQUAL "OFF")
55+
message(STATUS "Building WITH_STL=OFF")
56+
elseif(WITH_STL STREQUAL "CXX11")
57+
message(STATUS "Building WITH_STL=CXX11")
58+
target_compile_definitions(opentelemetry_api
59+
INTERFACE OPENTELEMETRY_STL_VERSION=2011)
60+
elseif(WITH_STL STREQUAL "CXX14")
61+
message(STATUS "Building WITH_STL=CXX14")
62+
target_compile_definitions(opentelemetry_api
63+
INTERFACE OPENTELEMETRY_STL_VERSION=2014)
64+
elseif(WITH_STL STREQUAL "CXX17")
65+
message(STATUS "Building WITH_STL=CXX17")
66+
target_compile_definitions(opentelemetry_api
67+
INTERFACE OPENTELEMETRY_STL_VERSION=2017)
68+
elseif(WITH_STL STREQUAL "CXX20")
69+
message(STATUS "Building WITH_STL=CXX20")
70+
target_compile_definitions(opentelemetry_api
71+
INTERFACE OPENTELEMETRY_STL_VERSION=2020)
72+
elseif(WITH_STL STREQUAL "CXX23")
73+
message(STATUS "Building WITH_STL=CXX23")
74+
target_compile_definitions(opentelemetry_api
75+
INTERFACE OPENTELEMETRY_STL_VERSION=2023)
76+
elseif(WITH_STL STREQUAL "ON")
77+
message(STATUS "Building WITH_STL=ON")
78+
# "ON" corresponds to "CXX23" at this time.
79+
target_compile_definitions(opentelemetry_api
80+
INTERFACE OPENTELEMETRY_STL_VERSION=2023)
6881
else()
69-
message(STATUS "Building with nostd types...")
82+
message(
83+
FATAL_ERROR "WITH_STL must be ON, OFF, CXX11, CXX14, CXX17, CXX20 or CXX23")
7084
endif()
7185

7286
if(WITH_GSL)
@@ -77,17 +91,14 @@ if(WITH_GSL)
7791
find_package(Microsoft.GSL QUIET)
7892
if(TARGET Microsoft.GSL::GSL)
7993
target_link_libraries(opentelemetry_api INTERFACE Microsoft.GSL::GSL)
94+
list(APPEND TARGET_DEPS "gsl")
8095
else()
8196
set(GSL_DIR third_party/ms-gsl)
8297
target_include_directories(
8398
opentelemetry_api INTERFACE "$<BUILD_INTERFACE:${GSL_DIR}/include>")
8499
endif()
85100
endif()
86101

87-
if(WITH_LOGS_PREVIEW)
88-
target_compile_definitions(opentelemetry_api INTERFACE ENABLE_LOGS_PREVIEW)
89-
endif()
90-
91102
if(WITH_NO_GETENV)
92103
target_compile_definitions(opentelemetry_api INTERFACE NO_GETENV)
93104
endif()
@@ -108,6 +119,10 @@ if(WITH_REMOVE_METER_PREVIEW)
108119
INTERFACE ENABLE_REMOVE_METER_PREVIEW)
109120
endif()
110121

122+
target_compile_definitions(
123+
opentelemetry_api
124+
INTERFACE OPENTELEMETRY_ABI_VERSION_NO=${OPENTELEMETRY_ABI_VERSION_NO})
125+
111126
# A better place should be in sdk, not api
112127
if(WITH_OTLP_HTTP_SSL_PREVIEW)
113128
target_compile_definitions(opentelemetry_api
@@ -132,3 +147,12 @@ if(WITH_METRICS_EXEMPLAR_PREVIEW)
132147
target_compile_definitions(opentelemetry_api
133148
INTERFACE ENABLE_METRICS_EXEMPLAR_PREVIEW)
134149
endif()
150+
151+
include(${PROJECT_SOURCE_DIR}/cmake/pkgconfig.cmake)
152+
153+
if(OPENTELEMETRY_INSTALL)
154+
opentelemetry_add_pkgconfig(
155+
api "OpenTelemetry API"
156+
"A header-only library to support instrumentation with OpenTelemetry."
157+
"${TARGET_DEPS}")
158+
endif()

jdbc/extra/otel/opentelemetry-cpp-1.10.0/api/include/opentelemetry/logs/event_id.h renamed to jdbc/extra/otel/opentelemetry-cpp-1.12.0/api/include/opentelemetry/logs/event_id.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33

44
#pragma once
55

6-
#ifdef ENABLE_LOGS_PREVIEW
6+
#include <algorithm>
77

8-
# include <algorithm>
9-
10-
# include "opentelemetry/nostd/string_view.h"
11-
# include "opentelemetry/nostd/unique_ptr.h"
12-
# include "opentelemetry/version.h"
8+
#include "opentelemetry/nostd/string_view.h"
9+
#include "opentelemetry/nostd/unique_ptr.h"
10+
#include "opentelemetry/version.h"
1311

1412
OPENTELEMETRY_BEGIN_NAMESPACE
1513
namespace logs
@@ -37,4 +35,3 @@ class EventId
3735

3836
} // namespace logs
3937
OPENTELEMETRY_END_NAMESPACE
40-
#endif

jdbc/extra/otel/opentelemetry-cpp-1.10.0/api/include/opentelemetry/logs/event_logger.h renamed to jdbc/extra/otel/opentelemetry-cpp-1.12.0/api/include/opentelemetry/logs/event_logger.h

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
#pragma once
5-
#ifdef ENABLE_LOGS_PREVIEW
65

7-
# include "opentelemetry/logs/log_record.h"
8-
# include "opentelemetry/logs/logger.h"
9-
# include "opentelemetry/logs/logger_type_traits.h"
10-
# include "opentelemetry/nostd/shared_ptr.h"
11-
# include "opentelemetry/nostd/string_view.h"
12-
# include "opentelemetry/nostd/unique_ptr.h"
13-
# include "opentelemetry/version.h"
6+
#include "opentelemetry/logs/log_record.h"
7+
#include "opentelemetry/logs/logger.h"
8+
#include "opentelemetry/logs/logger_type_traits.h"
9+
#include "opentelemetry/nostd/shared_ptr.h"
10+
#include "opentelemetry/nostd/string_view.h"
11+
#include "opentelemetry/nostd/unique_ptr.h"
12+
#include "opentelemetry/version.h"
1413

1514
OPENTELEMETRY_BEGIN_NAMESPACE
1615
namespace logs
@@ -84,5 +83,3 @@ class EventLogger
8483
};
8584
} // namespace logs
8685
OPENTELEMETRY_END_NAMESPACE
87-
88-
#endif

jdbc/extra/otel/opentelemetry-cpp-1.10.0/api/include/opentelemetry/logs/event_logger_provider.h renamed to jdbc/extra/otel/opentelemetry-cpp-1.12.0/api/include/opentelemetry/logs/event_logger_provider.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
#pragma once
5-
#ifdef ENABLE_LOGS_PREVIEW
65

7-
# include "opentelemetry/nostd/shared_ptr.h"
8-
# include "opentelemetry/nostd/string_view.h"
9-
# include "opentelemetry/version.h"
6+
#include "opentelemetry/nostd/shared_ptr.h"
7+
#include "opentelemetry/nostd/string_view.h"
8+
#include "opentelemetry/version.h"
109

1110
OPENTELEMETRY_BEGIN_NAMESPACE
1211
namespace logs
@@ -34,4 +33,3 @@ class EventLoggerProvider
3433
};
3534
} // namespace logs
3635
OPENTELEMETRY_END_NAMESPACE
37-
#endif

jdbc/extra/otel/opentelemetry-cpp-1.10.0/api/include/opentelemetry/logs/log_record.h renamed to jdbc/extra/otel/opentelemetry-cpp-1.12.0/api/include/opentelemetry/logs/log_record.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
#pragma once
5-
#ifdef ENABLE_LOGS_PREVIEW
65

7-
# include "opentelemetry/common/attribute_value.h"
8-
# include "opentelemetry/common/timestamp.h"
9-
# include "opentelemetry/version.h"
6+
#include "opentelemetry/common/attribute_value.h"
7+
#include "opentelemetry/common/timestamp.h"
8+
#include "opentelemetry/version.h"
109

1110
OPENTELEMETRY_BEGIN_NAMESPACE
1211
namespace trace
@@ -91,4 +90,3 @@ class LogRecord
9190
};
9291
} // namespace logs
9392
OPENTELEMETRY_END_NAMESPACE
94-
#endif

jdbc/extra/otel/opentelemetry-cpp-1.10.0/api/include/opentelemetry/logs/logger.h renamed to jdbc/extra/otel/opentelemetry-cpp-1.12.0/api/include/opentelemetry/logs/logger.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
#pragma once
5-
#ifdef ENABLE_LOGS_PREVIEW
65

7-
# include "opentelemetry/logs/logger_type_traits.h"
8-
# include "opentelemetry/logs/severity.h"
9-
# include "opentelemetry/nostd/string_view.h"
10-
# include "opentelemetry/nostd/unique_ptr.h"
11-
# include "opentelemetry/version.h"
6+
#include "opentelemetry/logs/logger_type_traits.h"
7+
#include "opentelemetry/logs/severity.h"
8+
#include "opentelemetry/nostd/string_view.h"
9+
#include "opentelemetry/nostd/unique_ptr.h"
10+
#include "opentelemetry/version.h"
1211

1312
OPENTELEMETRY_BEGIN_NAMESPACE
1413
namespace common
@@ -475,5 +474,3 @@ class Logger
475474
};
476475
} // namespace logs
477476
OPENTELEMETRY_END_NAMESPACE
478-
479-
#endif // end of ENABLE_LOGS_PREVIEW

jdbc/extra/otel/opentelemetry-cpp-1.10.0/api/include/opentelemetry/logs/logger_provider.h renamed to jdbc/extra/otel/opentelemetry-cpp-1.12.0/api/include/opentelemetry/logs/logger_provider.h

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33

44
#pragma once
55

6-
#ifdef ENABLE_LOGS_PREVIEW
7-
8-
# include "opentelemetry/common/key_value_iterable.h"
9-
# include "opentelemetry/common/key_value_iterable_view.h"
10-
# include "opentelemetry/nostd/shared_ptr.h"
11-
# include "opentelemetry/nostd/span.h"
12-
# include "opentelemetry/nostd/string_view.h"
13-
# include "opentelemetry/nostd/type_traits.h"
14-
# include "opentelemetry/version.h"
6+
#include "opentelemetry/common/key_value_iterable.h"
7+
#include "opentelemetry/common/key_value_iterable_view.h"
8+
#include "opentelemetry/nostd/shared_ptr.h"
9+
#include "opentelemetry/nostd/span.h"
10+
#include "opentelemetry/nostd/string_view.h"
11+
#include "opentelemetry/nostd/type_traits.h"
12+
#include "opentelemetry/version.h"
1513

1614
OPENTELEMETRY_BEGIN_NAMESPACE
1715
namespace logs
@@ -71,5 +69,3 @@ class OPENTELEMETRY_EXPORT LoggerProvider
7169
};
7270
} // namespace logs
7371
OPENTELEMETRY_END_NAMESPACE
74-
75-
#endif // ENABLE_LOGS_PREVIEW

0 commit comments

Comments
 (0)