Skip to content

Commit 4d16975

Browse files
committed
Merge branch 'main' into add-scope-config
2 parents 7c90e1b + ced7986 commit 4d16975

File tree

106 files changed

+2715
-331
lines changed

Some content is hidden

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

106 files changed

+2715
-331
lines changed

.devcontainer/Dockerfile.dev

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
FROM otel/cpp_format_tools
5+
6+
ARG GRPC_VERSION=v1.55.0
7+
ARG PROTOBUF_VERSION=23.4
8+
ARG ABSEIL_CPP_VERSION=20240116.1
9+
10+
ENV PROTOBUF_VERSION=${PROTOBUF_VERSION}
11+
ENV ABSEIL_CPP_VERSION=${ABSEIL_CPP_VERSION}
12+
13+
COPY ci /opt/ci
14+
15+
RUN apt update && apt install -y wget \
16+
ninja-build \
17+
libcurl4-openssl-dev \
18+
markdownlint
19+
20+
RUN cd /opt/ci && bash setup_cmake.sh
21+
RUN cd /opt/ci && bash setup_ci_environment.sh
22+
RUN cd /opt && bash ci/setup_googletest.sh \
23+
&& bash ci/setup_grpc.sh -r ${GRPC_VERSION}
24+
25+
ADD https://github.com/bazelbuild/bazelisk/releases/download/v1.22.1/bazelisk-linux-amd64 /usr/local/bin
26+
27+
RUN git config --global core.autocrlf input \
28+
&& chmod +x /usr/local/bin/bazelisk-linux-amd64

.devcontainer/devcontainer.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
4+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.162.0/containers/javascript-node
5+
{
6+
"name": "opentelemetry-cpp",
7+
"build": {
8+
"context": "..",
9+
"dockerfile": "Dockerfile.dev",
10+
"args": {
11+
"GRPC_VERSION": "v1.55.0",
12+
"PROTOBUF_VERSION": "23.4",
13+
"ABSEIL_CPP_VERSION":"20240116.1"
14+
}
15+
},
16+
"settings": {
17+
"terminal.integrated.shell.linux": "/bin/sh"
18+
},
19+
"extensions": [
20+
"ms-vscode.cpptools",
21+
"ms-azuretools.vscode-docker",
22+
"ms-vscode.cpptools-extension-pack"
23+
],
24+
25+
"remoteUser": "root"
26+
}

.github/dependabot.yml

+5
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ updates:
66
interval: "daily"
77
labels:
88
- "GHA"
9+
10+
- package-ecosystem: "devcontainers"
11+
directory: "/"
12+
schedule:
13+
interval: daily

.github/workflows/ci.yml

+15
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ jobs:
7878
sudo -E ./ci/setup_googletest.sh
7979
sudo -E ./ci/setup_ci_environment.sh
8080
sudo -E ./ci/install_protobuf.sh
81+
- name: setup grpc
82+
run: |
83+
sudo ./ci/setup_grpc.sh
8184
- name: run cmake gcc (maintainer mode, sync)
8285
env:
8386
CC: /usr/bin/gcc-14
@@ -111,6 +114,9 @@ jobs:
111114
sudo -E ./ci/setup_googletest.sh
112115
sudo -E ./ci/setup_ci_environment.sh
113116
sudo -E ./ci/install_protobuf.sh
117+
- name: setup grpc
118+
run: |
119+
sudo ./ci/setup_grpc.sh
114120
- name: run cmake gcc (maintainer mode, async)
115121
env:
116122
CC: /usr/bin/gcc-14
@@ -144,6 +150,9 @@ jobs:
144150
sudo -E ./ci/setup_googletest.sh
145151
sudo -E ./ci/setup_ci_environment.sh
146152
sudo -E ./ci/install_protobuf.sh
153+
- name: setup grpc
154+
run: |
155+
sudo ./ci/setup_grpc.sh
147156
- name: run cmake clang (maintainer mode, sync)
148157
env:
149158
CC: /usr/bin/clang-18
@@ -177,6 +186,9 @@ jobs:
177186
sudo -E ./ci/setup_googletest.sh
178187
sudo -E ./ci/setup_ci_environment.sh
179188
sudo -E ./ci/install_protobuf.sh
189+
- name: setup grpc
190+
run: |
191+
sudo ./ci/setup_grpc.sh
180192
- name: run cmake clang (maintainer mode, async)
181193
env:
182194
CC: /usr/bin/clang-18
@@ -210,6 +222,9 @@ jobs:
210222
sudo -E ./ci/setup_googletest.sh
211223
sudo -E ./ci/setup_ci_environment.sh
212224
sudo -E ./ci/install_protobuf.sh
225+
- name: setup grpc
226+
run: |
227+
sudo ./ci/setup_grpc.sh
213228
- name: run cmake clang (maintainer mode, abiv2)
214229
env:
215230
CC: /usr/bin/clang-18

.github/workflows/iwyu.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
libgtest-dev \
3232
libbenchmark-dev
3333
34+
- name: setup grpc
35+
run: |
36+
sudo ./ci/setup_grpc.sh
37+
3438
- name: Prepare CMake
3539
run: |
3640
TOPDIR=`pwd`
@@ -41,12 +45,14 @@ jobs:
4145
-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="include-what-you-use;-w;-Xiwyu;--mapping_file=${TOPDIR}/.iwyu.imp;" \
4246
-DBUILD_TESTING=ON \
4347
-DBUILD_W3CTRACECONTEXT_TEST=ON \
44-
-DWITH_OTLP_GRPC=OFF \
48+
-DWITH_OTLP_GRPC=ON \
4549
-DWITH_OTLP_HTTP=ON \
4650
-DWITH_OTLP_FILE=ON \
51+
-DWITH_OPENTRACING=ON \
4752
-DWITH_OTLP_HTTP_COMPRESSION=ON \
53+
-DWITH_THREAD_INSTRUMENTATION=ON \
4854
-DWITH_ZIPKIN=ON \
49-
-DWITH_PROMETHEUS=OFF \
55+
-DWITH_PROMETHEUS=ON \
5056
..
5157
5258
- name: iwyu_tool
@@ -67,7 +73,7 @@ jobs:
6773
readonly WARNING_COUNT=`grep -c "include-what-you-use reported diagnostics:" iwyu.log`
6874
echo "include-what-you-use reported ${WARNING_COUNT} warning(s)"
6975
# Acceptable limit, to decrease over time down to 0
70-
readonly WARNING_LIMIT=180
76+
readonly WARNING_LIMIT=0
7177
# FAIL the build if WARNING_COUNT > WARNING_LIMIT
7278
if [ $WARNING_COUNT -gt $WARNING_LIMIT ] ; then
7379
exit 1

CHANGELOG.md

+126-4
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,129 @@ Increment the:
1818
* [SDK] Add tracer scope configurator
1919
[#3137](https://github.com/open-telemetry/opentelemetry-cpp/pull/3137)
2020

21+
## [1.19 2025-01-22]
22+
23+
* [PROMETHEUS_EXPORTER] Fix default for emitting otel_scope attributes
24+
[#3171](https://github.com/open-telemetry/opentelemetry-cpp/pull/3171)
25+
26+
* [Code health] Include what you use cleanup, part 5
27+
[#3140](https://github.com/open-telemetry/opentelemetry-cpp/pull/3140)
28+
29+
* [BUILD] Upgrade cmake
30+
[#3167](https://github.com/open-telemetry/opentelemetry-cpp/pull/3167)
31+
32+
* [SHIM] Fix string_view mappings between OT and OTel
33+
[#3181](https://github.com/open-telemetry/opentelemetry-cpp/pull/3181)
34+
35+
* [EXPORTER] Refactor ElasticSearchRecordable
36+
[#3164](https://github.com/open-telemetry/opentelemetry-cpp/pull/3164)
37+
38+
* [SEMANTIC CONVENTIONS] Upgrade to semantic conventions 1.29.0
39+
[#3182](https://github.com/open-telemetry/opentelemetry-cpp/pull/3182)
40+
41+
* [BUILD] Fix cross-compilation with protoc
42+
[#3186](https://github.com/open-telemetry/opentelemetry-cpp/pull/3186)
43+
44+
* [Code health] Perform cppcheck cleanup
45+
[#3150](https://github.com/open-telemetry/opentelemetry-cpp/pull/3150)
46+
47+
* [EXPORTER] add instrumentation scope attributes
48+
to otlp proto messages for traces and metrics
49+
[#3185](https://github.com/open-telemetry/opentelemetry-cpp/pull/3185)
50+
51+
* [SDK] Tracer provider shutdown blocks in-definitively
52+
[#3191](https://github.com/open-telemetry/opentelemetry-cpp/pull/3191)
53+
54+
* [SEMANTIC CONVENTIONS] Upgrade to weaver 0.11.0
55+
[#3194](https://github.com/open-telemetry/opentelemetry-cpp/pull/3194)
56+
57+
* [DOC] Update existing maintaining dependencies doc
58+
[#3195](https://github.com/open-telemetry/opentelemetry-cpp/pull/3195)
59+
60+
* [TEST] Change is_called_ and got_response_ to use atomic
61+
[#3204](https://github.com/open-telemetry/opentelemetry-cpp/pull/3204)
62+
63+
* [SEMANTIC CONVENTIONS] update links to openmetrics to reference the v1.0.0 release
64+
[#3205](https://github.com/open-telemetry/opentelemetry-cpp/pull/3205)
65+
66+
* [CI] Fix CI on ubuntu-latest
67+
[#3207](https://github.com/open-telemetry/opentelemetry-cpp/pull/3207)
68+
69+
* [BUILD] Build break using protoc 3.14
70+
[#3211](https://github.com/open-telemetry/opentelemetry-cpp/pull/3211)
71+
72+
* [TEST] Build the singleton test on windows
73+
[#3183](https://github.com/open-telemetry/opentelemetry-cpp/pull/3183)
74+
75+
* [BUILD] Add cxx feature detections
76+
[#3203](https://github.com/open-telemetry/opentelemetry-cpp/pull/3203)
77+
2178
* [SDK] Do not frequently create and destroy http client threads
2279
[#3198](https://github.com/open-telemetry/opentelemetry-cpp/pull/3198)
2380

24-
* [SDK] Fix instrumentation scope attributes evaluated in equal method
81+
* [EXPORTER] Optimize OTLP HTTP compression
82+
[#3178](https://github.com/open-telemetry/opentelemetry-cpp/pull/3178)
83+
84+
* [SDK] Fix include instrumentation scope attributes in equal method
2585
[#3214](https://github.com/open-telemetry/opentelemetry-cpp/pull/3214)
2686

27-
* [EXPORTER] Fix scope attributes missing from otlp traces metrics
28-
[#3185](https://github.com/open-telemetry/opentelemetry-cpp/pull/3185)
87+
* Upgrade to opentelemetry-proto 1.5.0
88+
[#3210](https://github.com/open-telemetry/opentelemetry-cpp/pull/3210)
89+
90+
* [TEST] Added support for SELINUX in functional tests
91+
[#3212](https://github.com/open-telemetry/opentelemetry-cpp/pull/3212)
92+
93+
* [EDITORIAL] fix changelog entry for PR 3185
94+
[#3217](https://github.com/open-telemetry/opentelemetry-cpp/pull/3217)
95+
96+
* [TEST] Functional tests for OTLP/gRPC with mutual TLS
97+
[#3227](https://github.com/open-telemetry/opentelemetry-cpp/pull/3227)
98+
99+
* [SEMCONV] Metrics are incorrectly prefixed with 'metric'
100+
[#3228](https://github.com/open-telemetry/opentelemetry-cpp/pull/3228)
101+
102+
* [BUILD] Add OTLP/file exporter for dll and examples
103+
[#3231](https://github.com/open-telemetry/opentelemetry-cpp/pull/3231)
29104

30-
* [EXPORTER] Fix throw in OtlpGrpcMetricExporter with shared grpc client
105+
* [Code Health] Include what you use, part 6
106+
[#3216](https://github.com/open-telemetry/opentelemetry-cpp/pull/3216)
107+
108+
* [CI] Spurious test failures
109+
[#3233](https://github.com/open-telemetry/opentelemetry-cpp/pull/3233)
110+
111+
* [BUILD] Fix error ‘uint8_t’ does not name a type with gcc-15
112+
[#3240](https://github.com/open-telemetry/opentelemetry-cpp/pull/3240)
113+
114+
* [EXPORTER] fix throw in OtlpGrpcMetricExporter with shared grpc client
31115
[#3243](https://github.com/open-telemetry/opentelemetry-cpp/pull/3243)
32116

33117
* [SDK] Better control of threads executed by opentelemetry-cpp
34118
[#3175](https://github.com/open-telemetry/opentelemetry-cpp/pull/3175)
35119

120+
* [Code Health] Include what you use, part 7
121+
[#3238](https://github.com/open-telemetry/opentelemetry-cpp/pull/3238)
122+
123+
* [SDK] Fix lifetime of GlobalLogHandler
124+
[#3221](https://github.com/open-telemetry/opentelemetry-cpp/pull/3221)
125+
126+
* [MAINTAINER] Add devcontainer
127+
[#3123](https://github.com/open-telemetry/opentelemetry-cpp/pull/3123)
128+
129+
* [SDK] enable deriving from ResourceDetector to create a Resource
130+
[#3247](https://github.com/open-telemetry/opentelemetry-cpp/pull/3247)
131+
132+
* [EXPORTER] Support handling retry-able errors for OTLP/HTTP
133+
[#3223](https://github.com/open-telemetry/opentelemetry-cpp/pull/3223)
134+
135+
* [CI] Add GRPC in maintainer CI
136+
[#3248](https://github.com/open-telemetry/opentelemetry-cpp/pull/3248)
137+
138+
* [EXPORTER] Support handling retry-able errors for OTLP/gRPC
139+
[#3219](https://github.com/open-telemetry/opentelemetry-cpp/pull/3219)
140+
141+
* [SDK] Optimize Metric Processing for Single Collector with Delta Temporality
142+
[#3236](https://github.com/open-telemetry/opentelemetry-cpp/pull/3236)
143+
36144
New features:
37145

38146
* [SDK] Better control of threads executed by opentelemetry-cpp
@@ -90,6 +198,20 @@ New features:
90198
as well as the thread instrumentation interface,
91199
may change without notice before this feature is declared stable.
92200

201+
* [EXPORTER] Support handling retry-able errors for OTLP/HTTP
202+
[#3223](https://github.com/open-telemetry/opentelemetry-cpp/pull/3223)
203+
204+
* This feature is experimental,
205+
protected by a WITH_OTLP_RETRY_PREVIEW
206+
flag in CMake.
207+
208+
* [EXPORTER] Support handling retry-able errors for OTLP/gRPC
209+
[#3219](https://github.com/open-telemetry/opentelemetry-cpp/pull/3219)
210+
211+
* This feature is experimental,
212+
protected by a WITH_OTLP_RETRY_PREVIEW
213+
flag in CMake.
214+
93215
## [1.18 2024-11-25]
94216

95217
* [EXPORTER] Fix crash in ElasticsearchLogRecordExporter

CMakeLists.txt

+13
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ if(NOT WITH_STL STREQUAL "OFF")
212212
endif()
213213
endif()
214214

215+
option(WITH_OTLP_RETRY_PREVIEW
216+
"Whether to enable experimental retry functionality" OFF)
217+
215218
option(WITH_OTLP_GRPC_SSL_MTLS_PREVIEW
216219
"Whether to enable mTLS support fro gRPC" OFF)
217220

@@ -369,11 +372,16 @@ if(WITH_PROMETHEUS)
369372
if(EXISTS ${PROJECT_SOURCE_DIR}/third_party/prometheus-cpp/.git)
370373
set(SAVED_ENABLE_TESTING ${ENABLE_TESTING})
371374
set(SAVED_CMAKE_CXX_CLANG_TIDY ${CMAKE_CXX_CLANG_TIDY})
375+
set(SAVED_CMAKE_CXX_INCLUDE_WHAT_YOU_USE
376+
${CMAKE_CXX_INCLUDE_WHAT_YOU_USE})
372377
set(ENABLE_TESTING OFF)
373378
set(CMAKE_CXX_CLANG_TIDY "")
379+
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "")
374380
add_subdirectory(third_party/prometheus-cpp)
375381
set(ENABLE_TESTING ${SAVED_ENABLE_TESTING})
376382
set(CMAKE_CXX_CLANG_TIDY ${SAVED_CMAKE_CXX_CLANG_TIDY})
383+
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE
384+
${SAVED_CMAKE_CXX_INCLUDE_WHAT_YOU_USE})
377385
else()
378386
message(
379387
FATAL_ERROR
@@ -715,8 +723,13 @@ if(WITH_OPENTRACING)
715723
if(EXISTS "${PROJECT_SOURCE_DIR}/${OPENTRACING_DIR}/.git")
716724
set(SAVED_BUILD_TESTING ${BUILD_TESTING})
717725
set(BUILD_TESTING OFF)
726+
set(SAVED_CMAKE_CXX_INCLUDE_WHAT_YOU_USE
727+
${CMAKE_CXX_INCLUDE_WHAT_YOU_USE})
728+
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "")
718729
add_subdirectory(${OPENTRACING_DIR})
719730
set(BUILD_TESTING ${SAVED_BUILD_TESTING})
731+
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE
732+
${SAVED_CMAKE_CXX_INCLUDE_WHAT_YOU_USE})
720733
else()
721734
message(
722735
FATAL_ERROR

0 commit comments

Comments
 (0)