Skip to content

Commit

Permalink
Merge branch 'main' into ks/add-support-for-bzlmod
Browse files Browse the repository at this point in the history
  • Loading branch information
esigo authored Apr 8, 2024
2 parents b18e36e + 848db57 commit 9269fcb
Show file tree
Hide file tree
Showing 67 changed files with 4,638 additions and 131 deletions.
70 changes: 32 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
CC: /usr/bin/gcc-10
CXX: /usr/bin/g++-10
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
- name: run cmake tests (without otlp-exporter)
env:
Expand All @@ -41,7 +41,7 @@ jobs:
CXX: /usr/bin/g++-13
PROTOBUF_VERSION: 21.12
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/install_protobuf.sh
- name: run cmake gcc (maintainer mode, sync)
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
CXX: /usr/bin/g++-13
PROTOBUF_VERSION: 21.12
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/install_protobuf.sh
- name: run cmake gcc (maintainer mode, async)
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
CXX: /usr/bin/clang++-15
PROTOBUF_VERSION: 21.12
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/install_protobuf.sh
- name: run cmake clang (maintainer mode, sync)
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
CXX: /usr/bin/clang++-15
PROTOBUF_VERSION: 21.12
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/install_protobuf.sh
- name: run cmake clang (maintainer mode, async)
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
CXX: /usr/bin/clang++-15
PROTOBUF_VERSION: 21.12
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/install_protobuf.sh
- name: run cmake clang (maintainer mode, abiv2)
Expand Down Expand Up @@ -197,7 +197,6 @@ jobs:
submodules: 'recursive'
- name: setup
run: |
./ci/setup_windows_cmake.ps1
./ci/setup_windows_ci_environment.ps1
- name: run tests
run: ./ci/do_ci.ps1 cmake.maintainer.test
Expand All @@ -211,7 +210,6 @@ jobs:
submodules: 'recursive'
- name: setup
run: |
./ci/setup_windows_cmake.ps1
./ci/setup_windows_ci_environment.ps1
- name: run tests
env:
Expand All @@ -230,7 +228,7 @@ jobs:
CC: /usr/bin/gcc-10
CXX: /usr/bin/g++-10
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
- name: run cmake tests (without otlp-exporter)
env:
Expand All @@ -248,7 +246,7 @@ jobs:
submodules: 'recursive'
- name: setup
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
- name: run cmake tests (enable abseil-cpp)
run: |
Expand All @@ -264,7 +262,7 @@ jobs:
submodules: 'recursive'
- name: setup
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
- name: run cmake tests (enable opentracing-shim)
run: ./ci/do_ci.sh cmake.opentracing_shim.test
Expand All @@ -277,11 +275,9 @@ jobs:
with:
submodules: 'recursive'
- name: setup
env:
CMAKE_VERSION: 3.20.6
run: |
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
- name: run tests (enable stl)
env:
CXX_STANDARD: '14'
Expand All @@ -295,11 +291,9 @@ jobs:
with:
submodules: 'recursive'
- name: setup
env:
CMAKE_VERSION: 3.20.6
run: |
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
- name: run tests (enable stl)
env:
CXX_STANDARD: '17'
Expand All @@ -313,11 +307,9 @@ jobs:
with:
submodules: 'recursive'
- name: setup
env:
CMAKE_VERSION: 3.20.6
run: |
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
- name: run tests
env:
CXX_STANDARD: '20'
Expand All @@ -339,10 +331,9 @@ jobs:
CC: /usr/bin/clang
CXX: /usr/bin/clang++
CXXFLAGS: "-stdlib=libc++"
CMAKE_VERSION: 3.20.6
run: |
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
- name: run tests
env:
CC: /usr/bin/clang
Expand All @@ -366,11 +357,9 @@ jobs:
with:
submodules: 'recursive'
- name: setup
env:
CMAKE_VERSION: 3.20.6
run: |
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
- name: run tests
env:
CXX_STANDARD: '23'
Expand All @@ -392,10 +381,9 @@ jobs:
CC: /usr/bin/clang
CXX: /usr/bin/clang++
CXXFLAGS: "-stdlib=libc++"
CMAKE_VERSION: 3.20.6
run: |
sudo -E ./ci/setup_ci_environment.sh
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
- name: run tests
env:
CC: /usr/bin/clang
Expand All @@ -420,7 +408,7 @@ jobs:
submodules: 'recursive'
- name: setup
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
- name: run otlp exporter tests
run: |
Expand All @@ -440,7 +428,7 @@ jobs:
ABSEIL_CPP_VERSION: '20230125.3'
CXX_STANDARD: '14'
run: |
sudo ./ci/setup_cmake.sh
sudo ./ci/setup_googletest.sh
sudo ./ci/setup_ci_environment.sh
sudo -E ./ci/install_abseil.sh
sudo -E ./ci/install_protobuf.sh
Expand All @@ -461,7 +449,7 @@ jobs:
submodules: 'recursive'
- name: setup
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
- name: run otlp exporter tests
run: |
Expand All @@ -477,7 +465,7 @@ jobs:
submodules: 'recursive'
- name: setup
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
- name: run otlp exporter tests
run: |
Expand All @@ -493,7 +481,7 @@ jobs:
submodules: 'recursive'
- name: setup
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
- name: run cmake install (with abseil)
run: |
Expand All @@ -515,7 +503,7 @@ jobs:
CC: /usr/bin/gcc-10
CXX: /usr/bin/g++-10
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
- name: run tests
env:
Expand Down Expand Up @@ -763,7 +751,6 @@ jobs:
submodules: 'recursive'
- name: setup
run: |
./ci/setup_windows_cmake.ps1
./ci/setup_windows_ci_environment.ps1
./ci/install_windows_protobuf.ps1
- name: run cmake test
Expand All @@ -780,7 +767,6 @@ jobs:
submodules: 'recursive'
- name: setup
run: |
./ci/setup_windows_cmake.ps1
./ci/setup_windows_ci_environment.ps1
./ci/install_windows_protobuf.ps1
- name: run cmake test (DLL build)
Expand All @@ -799,7 +785,6 @@ jobs:
submodules: 'recursive'
- name: setup
run: |
./ci/setup_windows_cmake.ps1
./ci/setup_windows_ci_environment.ps1
./ci/install_windows_protobuf.ps1
- name: run cmake test
Expand Down Expand Up @@ -829,7 +814,6 @@ jobs:
submodules: 'recursive'
- name: setup
run: |
./ci/setup_windows_cmake.ps1
./ci/setup_windows_ci_environment.ps1
- name: run tests
run: ./ci/do_ci.ps1 cmake.test_example_plugin
Expand All @@ -846,7 +830,7 @@ jobs:
CC: /usr/bin/gcc-10
CXX: /usr/bin/g++-10
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
- name: run tests and generate report
env:
Expand All @@ -871,6 +855,16 @@ jobs:
- name: run markdownlint
run: markdownlint .

shellcheck:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v4
- name: install shellcheck
run: sudo apt install --assume-yes shellcheck
- name: run shellcheck
run: find . -name \*.sh | xargs shellcheck --severity=error

misspell:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
CXX: /usr/bin/g++-10
GOOGLETEST_VERSION: 1.12.1
run: |
sudo -E ./ci/setup_cmake.sh
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ Increment the:

## [Unreleased]

* [EXPORTER] Add OTLP File exporters
[#2540](https://github.com/open-telemetry/opentelemetry-cpp/pull/2540)
* [EXPORTER] Gzip compression support for OTLP/HTTP and OTLP/gRPC exporter
[#2530](https://github.com/open-telemetry/opentelemetry-cpp/pull/2530)
* [EXPORTER] Support URL-encoded values for `OTEL_EXPORTER_OTLP_HEADERS`
[#2579](https://github.com/open-telemetry/opentelemetry-cpp/pull/2579)
* [CI] Use platform CMake
[#2627](https://github.com/open-telemetry/opentelemetry-cpp/pull/2627)

Important changes:

Expand All @@ -32,6 +36,13 @@ Important changes:
dependency on zlib.
* [SDK] Change OTLP HTTP content_type default to binary
[#2558](https://github.com/open-telemetry/opentelemetry-cpp/pull/2558)
* [CI] Use platform CMake
[#2627](https://github.com/open-telemetry/opentelemetry-cpp/pull/2627)
* The `CI` in github no longer install a different version of `cmake`.
* It now always use the `cmake` provided by the platform.
* As part of this change, the script `ci/setup_cmake.sh` was renamed
to `ci/setup_googletest.sh`, for clarity, now that this script
only installs googletest.

## [1.14.2] 2024-02-27

Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ option(WITH_OTLP_GRPC "Whether to include the OTLP gRPC exporter in the SDK"
option(WITH_OTLP_HTTP "Whether to include the OTLP http exporter in the SDK"
OFF)

option(WITH_OTLP_FILE "Whether to include the OTLP file exporter in the SDK"
OFF)

option(
WITH_OTLP_HTTP_COMPRESSION
"Whether to include gzip compression for the OTLP http exporter in the SDK"
Expand Down Expand Up @@ -370,7 +373,9 @@ if(WITH_ABSEIL)
find_package(absl CONFIG REQUIRED)
endif()

if(WITH_OTLP_GRPC OR WITH_OTLP_HTTP)
if(WITH_OTLP_GRPC
OR WITH_OTLP_HTTP
OR WITH_OTLP_FILE)
find_package(Protobuf)
if(Protobuf_VERSION AND Protobuf_VERSION VERSION_GREATER_EQUAL "3.22.0")
if(NOT WITH_ABSEIL)
Expand Down Expand Up @@ -473,6 +478,7 @@ endif()
if(WITH_ELASTICSEARCH
OR WITH_ZIPKIN
OR WITH_OTLP_HTTP
OR WITH_OTLP_FILE
OR BUILD_W3CTRACECONTEXT_TEST
OR WITH_ETW)
set(USE_NLOHMANN_JSON ON)
Expand Down
10 changes: 8 additions & 2 deletions api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,14 @@ if(WITH_ABSEIL)
target_link_libraries(
opentelemetry_api INTERFACE absl::bad_variant_access absl::any absl::base
absl::bits absl::city)
list(APPEND TARGET_DEPS "absl_bad_variant_access" "absl_any absl_base"
"absl_bits" "absl_city")
list(
APPEND
TARGET_DEPS
"absl_bad_variant_access"
"absl_any"
"absl_base"
"absl_bits"
"absl_city")
endif()

if(WITH_STL STREQUAL "OFF")
Expand Down
4 changes: 2 additions & 2 deletions api/include/opentelemetry/metrics/meter.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Meter
nostd::string_view unit = "") noexcept = 0;

/**
* Creates a Asynchronouse (Observable) Gauge with the passed characteristics and returns a
* Creates a Asynchronous (Observable) Gauge with the passed characteristics and returns a
* shared_ptr to that Observable Gauge
*
* @param name the name of the new Observable Gauge.
Expand Down Expand Up @@ -129,7 +129,7 @@ class Meter
nostd::string_view unit = "") noexcept = 0;

/**
* Creates a Asynchronouse (Observable) UpDownCounter with the passed characteristics and returns
* Creates a Asynchronous (Observable) UpDownCounter with the passed characteristics and returns
* a shared_ptr to that Observable UpDownCounter
*
* @param name the name of the new Observable UpDownCounter.
Expand Down
Loading

0 comments on commit 9269fcb

Please sign in to comment.