Skip to content

Commit 071336c

Browse files
committed
Merge branch 'main' into poc_config_yaml
2 parents f010853 + 6603c3a commit 071336c

File tree

98 files changed

+4775
-346
lines changed

Some content is hidden

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

98 files changed

+4775
-346
lines changed

.devcontainer/Dockerfile.dev

Lines changed: 28 additions & 0 deletions
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

Lines changed: 26 additions & 0 deletions
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

Lines changed: 5 additions & 0 deletions
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

Lines changed: 15 additions & 0 deletions
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
@@ -211,6 +220,9 @@ jobs:
211220
sudo -E ./ci/setup_googletest.sh
212221
sudo -E ./ci/setup_ci_environment.sh
213222
sudo -E ./ci/install_protobuf.sh
223+
- name: setup grpc
224+
run: |
225+
sudo ./ci/setup_grpc.sh
214226
- name: run cmake clang (maintainer mode, async)
215227
env:
216228
CC: /usr/bin/clang-18
@@ -244,6 +256,9 @@ jobs:
244256
sudo -E ./ci/setup_googletest.sh
245257
sudo -E ./ci/setup_ci_environment.sh
246258
sudo -E ./ci/install_protobuf.sh
259+
- name: setup grpc
260+
run: |
261+
sudo ./ci/setup_grpc.sh
247262
- name: run cmake clang (maintainer mode, abiv2)
248263
env:
249264
CC: /usr/bin/clang-18

.github/workflows/iwyu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
readonly WARNING_COUNT=`grep -c "include-what-you-use reported diagnostics:" iwyu.log`
7676
echo "include-what-you-use reported ${WARNING_COUNT} warning(s)"
7777
# Acceptable limit, to decrease over time down to 0
78-
readonly WARNING_LIMIT=10
78+
readonly WARNING_LIMIT=0
7979
# FAIL the build if WARNING_COUNT > WARNING_LIMIT
8080
if [ $WARNING_COUNT -gt $WARNING_LIMIT ] ; then
8181
exit 1

.iwyu.imp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,8 @@
3535
# We prefer to include <gmock/gmock.h> for simplicity
3636
{ "include": ["<gmock/gmock-function-mocker.h>", "private", "<gmock/gmock.h>", "public"] },
3737
{ "include": ["<gmock/gmock-spec-builders.h>", "private", "<gmock/gmock.h>", "public"] },
38+
39+
# We prefer to include <curl/curl.h> for simplicity
40+
{ "include": ["<curl/system.h>", "private", "<curl/curl.h>", "public"] },
3841
]
3942

CHANGELOG.md

Lines changed: 126 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,129 @@ Increment the:
1515

1616
## [Unreleased]
1717

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

21-
* [SDK] Fix instrumentation scope attributes evaluated in equal method
78+
* [EXPORTER] Optimize OTLP HTTP compression
79+
[#3178](https://github.com/open-telemetry/opentelemetry-cpp/pull/3178)
80+
81+
* [SDK] Fix include instrumentation scope attributes in equal method
2282
[#3214](https://github.com/open-telemetry/opentelemetry-cpp/pull/3214)
2383

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

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

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

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

35143
* [SDK] Better control of threads executed by opentelemetry-cpp
@@ -87,6 +195,20 @@ New features:
87195
as well as the thread instrumentation interface,
88196
may change without notice before this feature is declared stable.
89197

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

92214
* [EXPORTER] Fix crash in ElasticsearchLogRecordExporter

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ if(NOT WITH_STL STREQUAL "OFF")
214214
endif()
215215
endif()
216216

217+
option(WITH_OTLP_RETRY_PREVIEW
218+
"Whether to enable experimental retry functionality" OFF)
219+
217220
option(WITH_OTLP_GRPC_SSL_MTLS_PREVIEW
218221
"Whether to enable mTLS support fro gRPC" OFF)
219222

CONTRIBUTING.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,91 @@ bazel build //examples/simple:example_simple
6060
bazel-bin/examples/simple/example_simple
6161
```
6262

63+
### DevContainer Setup for Project
64+
65+
This guide provides instructions on how to set up and use the development
66+
container (`devcontainer`) environment to streamline testing and development
67+
for this project. With the DevContainer, you can work in a consistent environment
68+
configured with all the necessary dependencies and tools.
69+
70+
#### Prerequisites
71+
72+
Before getting started, ensure you have the following installed:
73+
74+
* **Docker**: DevContainers require Docker for containerization.
75+
* **Visual Studio Code (VSCode)** with the **Remote - Containers** extension.
76+
77+
#### Getting Started
78+
79+
* **Open the Project in DevContainer**:
80+
81+
Open the project in VSCode. When prompted to "Reopen in Container," select
82+
this option. If you’re not prompted, you can manually open the container by
83+
selecting **Remote-Containers: Reopen in Container** from the command palette
84+
(`F1` or `Ctrl+Shift+P`).
85+
86+
* **Container Setup**:
87+
88+
The DevContainer environment will automatically build based on the configuration
89+
files provided (e.g., `.devcontainer/devcontainer.json`). This setup will install
90+
required dependencies, tools, and environment variables needed for the project.
91+
92+
#### Available Commands
93+
94+
Once inside the DevContainer, you can use the following commands to run tests
95+
and CI workflows.
96+
97+
##### 1. Run Tests with Bazelisk
98+
99+
To run tests with Bazelisk using specific compilation options, use:
100+
101+
```bash
102+
bazelisk-linux-amd64 test --copt=-DENABLE_LOGS_PREVIEW
103+
--test_output=errors --cache_test_results=no --copt=-DENABLE_TEST //exporters/otlp/...
104+
```
105+
106+
###### Command Breakdown
107+
108+
* `--copt=-DENABLE_LOGS_PREVIEW`: Enables preview logs.
109+
* `--test_output=errors`: Shows only the errors in the test output.
110+
* `--cache_test_results=no`: Forces Bazel to re-run tests without caching.
111+
* `--copt=-DENABLE_TEST`: Enables testing capabilities for the target code.
112+
* `//exporters/otlp/...`: Specifies the test target path.
113+
114+
##### 2. Run CI Script
115+
116+
You can also run the CI script provided to perform testing with the
117+
following command as an
118+
example:
119+
120+
```bash
121+
bash ci/do_ci.sh cmake.exporter.otprotocol.test
122+
```
123+
124+
This command initiates the CI pipeline, executing tests specifically for the
125+
**cmake.exporter.otprotocol** module.
126+
127+
#### Troubleshooting
128+
129+
If you encounter issues:
130+
131+
* **Rebuild the DevContainer**: From the command palette, run
132+
**Remote-Containers: Rebuild Container** to reinitialize the environment.
133+
* **Check Bazelisk and CI Script Logs**: Inspect logs for any configuration or
134+
dependency issues.
135+
136+
#### Additional Notes
137+
138+
* You can adjust compiler options (`--copt`) as needed to test additional flags
139+
or enable/disable specific features.
140+
* The test results will be displayed in the terminal within the DevContainer for
141+
easy debugging.
142+
143+
#### Resources
144+
145+
* **Bazelisk Documentation**: [https://github.com/bazelbuild/bazelisk](https://github.com/bazelbuild/bazelisk)
146+
* **VSCode DevContainer Documentation**: [https://code.visualstudio.com/docs/remote/containers](https://code.visualstudio.com/docs/remote/containers)
147+
63148
## Pull Requests
64149

65150
### How to Send Pull Requests

0 commit comments

Comments
 (0)