Skip to content

Commit 129c89f

Browse files
committed
Changes from code review
1 parent 87b854a commit 129c89f

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ if(NOT DEFINED OTEL_CPP_INSTALLED_DIR)
195195

196196
set(OTEL_CPP_CXX_STANDARD 14)
197197

198-
set(OTEL_ABI_VERSION OPENTELEMETRY_ABI_VERSION_NO=2)
198+
# The synchronous gauge metric instrument is only defined in ABI version 2
199+
set(OTEL_CPP_ABI_VERSION OPENTELEMETRY_ABI_VERSION_NO=2)
199200

200201
set(PATCHES_DIR ${CMAKE_SOURCE_DIR}/patches)
201202
if(SKIP_OTEL_CPP_PATCH)
@@ -370,7 +371,7 @@ if(WITH_OTLP_FILE)
370371
target_compile_definitions(${OPENTELEMETRY_PROXY_LIBRARY_NAME} PRIVATE WITH_OTLP_FILE)
371372
endif()
372373

373-
target_compile_definitions(${OPENTELEMETRY_PROXY_LIBRARY_NAME} PRIVATE ${OTEL_ABI_VERSION})
374+
target_compile_definitions(${OPENTELEMETRY_PROXY_LIBRARY_NAME} PRIVATE ${OTEL_CPP_ABI_VERSION})
374375

375376
# pass in version number
376377
target_compile_definitions(${OPENTELEMETRY_PROXY_LIBRARY_NAME} PRIVATE OTEL_MATLAB_VERSION="${OTEL_MATLAB_VERSION}")

examples/context_propagation/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ if(NOT DEFINED OTEL_CPP_INSTALLED_DIR)
88
add_dependencies(${CONTEXTPROP_EXAMPLE_CPP_TARGET} ${OTEL_CPP_PROJECT_NAME})
99
endif()
1010

11-
target_compile_definitions(${CONTEXTPROP_EXAMPLE_CPP_TARGET} PRIVATE ${OTEL_ABI_VERSION})
11+
# Specify the ABI version, include directories, and libraries of otel-cpp. The C++ code in this example directly calls otel-cpp functions.
12+
target_compile_definitions(${CONTEXTPROP_EXAMPLE_CPP_TARGET} PRIVATE ${OTEL_CPP_ABI_VERSION})
1213
target_include_directories(${CONTEXTPROP_EXAMPLE_CPP_TARGET} PRIVATE ${OTEL_CPP_PREFIX}/include)
1314
target_link_libraries(${CONTEXTPROP_EXAMPLE_CPP_TARGET} PRIVATE ${OPENTELEMETRY_PROXY_LINK_LIBRARIES})
1415
if(UNIX AND NOT APPLE AND NOT CYGWIN)

examples/webread/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ if(NOT DEFINED OTEL_CPP_INSTALLED_DIR)
55
add_dependencies(${WEBREAD_EXAMPLE_TARGET} ${OTEL_CPP_PROJECT_NAME})
66
endif()
77

8-
target_compile_definitions(${WEBREAD_EXAMPLE_TARGET} PRIVATE ${OTEL_ABI_VERSION})
8+
# Specify the ABI version, include directories, and libraries of otel-cpp. The C++ code in this example directly calls otel-cpp functions.
9+
target_compile_definitions(${WEBREAD_EXAMPLE_TARGET} PRIVATE ${OTEL_CPP_ABI_VERSION})
910
target_include_directories(${WEBREAD_EXAMPLE_TARGET} PRIVATE ${OTEL_CPP_PREFIX}/include)
1011
target_link_libraries(${WEBREAD_EXAMPLE_TARGET} PRIVATE ${OPENTELEMETRY_PROXY_LINK_LIBRARIES})
1112
if(UNIX AND NOT APPLE AND NOT CYGWIN)

sdk/common/+opentelemetry/+sdk/+common/addDefaultResource.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
function [keys, values] = addDefaultResource(keys, values)
2+
% Add default resource attributes
3+
% [KEYS, VALUES] = OPENTELEMETRY.SDK.COMMON.ADDDEFAULTRESOURCE(KEYS,
4+
% VALUES) appends default resource attribute names and values to the
5+
% input attribute names and values. The appended attribute names and
6+
% values are returned as output. Default resource attributes are
7+
% attributes that are always included in all telemetry data generated in
8+
% this package.
9+
10+
% Copyright 2025 The MathWorks, Inc.
211

312
% MATLAB version
413
v = string(version);

0 commit comments

Comments
 (0)