Skip to content

Commit 644af12

Browse files
authored
Merge branch 'main' into validate_utf8_string_in_otlp
2 parents f66b834 + cd4a4cb commit 644af12

4 files changed

Lines changed: 33 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,14 @@ jobs:
104104
- name: install dependencies
105105
run: |
106106
sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file third_party_release
107-
- name: run cmake gcc (maintainer mode, sync)
107+
- name: run cmake gcc (maintainer mode, sync, Debug)
108+
env:
109+
BUILD_TYPE: Debug
110+
run: |
111+
./ci/do_ci.sh cmake.maintainer.sync.test
112+
- name: run cmake gcc (maintainer mode, sync, Release)
113+
env:
114+
BUILD_TYPE: Release
108115
run: |
109116
./ci/do_ci.sh cmake.maintainer.sync.test
110117
- name: generate test cert
@@ -135,7 +142,14 @@ jobs:
135142
- name: install dependencies
136143
run: |
137144
sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file third_party_release
138-
- name: run cmake gcc (maintainer mode, async)
145+
- name: run cmake gcc (maintainer mode, async, Debug)
146+
env:
147+
BUILD_TYPE: Debug
148+
run: |
149+
./ci/do_ci.sh cmake.maintainer.async.test
150+
- name: run cmake gcc (maintainer mode, async, Release)
151+
env:
152+
BUILD_TYPE: Release
139153
run: |
140154
./ci/do_ci.sh cmake.maintainer.async.test
141155
- name: generate test cert

exporters/otlp/src/otlp_file_client.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,8 @@ class OPENTELEMETRY_LOCAL_SYMBOL OtlpFileSystemBackend : public OtlpFileAppender
12561256
strerror_s(error_message, sizeof(error_message) - 1, error_code);
12571257
#else
12581258
char error_message[256] = {0};
1259-
strerror_r(error_code, error_message, sizeof(error_message) - 1);
1259+
OPENTELEMETRY_MAYBE_UNUSED auto strerror_r_result =
1260+
strerror_r(error_code, error_message, sizeof(error_message) - 1);
12601261
#endif
12611262
OTEL_INTERNAL_LOG_ERROR("[OTLP FILE Client] Create directory \""
12621263
<< directory_name << "\" failed.errno: " << error_code

sdk/src/metrics/data/circular_buffer.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ void AdaptingIntegerArray::EnlargeToFit(uint64_t value)
123123
{
124124
backing = std::vector<uint64_t>(backing_size, 0);
125125
}
126-
std::swap(backing_, backing);
127-
nostd::visit(AdaptingIntegerArrayCopy{}, backing, backing_);
126+
nostd::visit(AdaptingIntegerArrayCopy{}, backing_, backing);
127+
backing_ = std::move(backing);
128128
}
129129

130130
void AdaptingCircularBufferCounter::Clear()

sdk/test/metrics/CMakeLists.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ foreach(
3535
periodic_exporting_metric_reader_test
3636
instrument_metadata_validator_test
3737
metric_test_stress
38-
instrument_descriptor_test
39-
multi_observer_test)
38+
instrument_descriptor_test)
4039
add_executable(${testname} "${testname}.cc")
4140
target_link_libraries(
4241
${testname} ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIB} ${CMAKE_THREAD_LIBS_INIT}
@@ -48,6 +47,18 @@ foreach(
4847
TEST_LIST ${testname})
4948
endforeach()
5049

50+
if(OPENTELEMETRY_ABI_VERSION_NO GREATER_EQUAL 2)
51+
add_executable(multi_observer_test multi_observer_test.cc)
52+
target_link_libraries(
53+
multi_observer_test ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIB}
54+
${CMAKE_THREAD_LIBS_INIT} metrics_common_test_utils opentelemetry_resources)
55+
target_compile_definitions(multi_observer_test PRIVATE UNIT_TESTING)
56+
gtest_add_tests(
57+
TARGET multi_observer_test
58+
TEST_PREFIX metrics.
59+
TEST_LIST multi_observer_test)
60+
endif()
61+
5162
if(WITH_BENCHMARK)
5263
add_executable(attributes_processor_benchmark
5364
attributes_processor_benchmark.cc)

0 commit comments

Comments
 (0)