Skip to content

Commit

Permalink
Merge branch 'main' into fix_ssl_preview_2383
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan authored Dec 13, 2023
2 parents cccf7c5 + 0b9371d commit 93d0e5c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
stale-issue-message: "This issue was marked as stale due to lack of activity."
days-before-issue-stale: 60
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Increment the:

* [REMOVAL] Remove option WITH_OTLP_HTTP_SSL_PREVIEW
[#2435](https://github.com/open-telemetry/opentelemetry-cpp/pull/2435)
* [BUILD] Fix removing of NOMINMAX on Windows
[#2449](https://github.com/open-telemetry/opentelemetry-cpp/pull/2449)

Important changes:

Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/std/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ OPENTELEMETRY_END_NAMESPACE
OPENTELEMETRY_BEGIN_NAMESPACE
namespace nostd
{
constexpr std::size_t dynamic_extent = (std::numeric_limits<std::size_t>::max());
constexpr std::size_t dynamic_extent = (std::numeric_limits<std::size_t>::max)();

template <class ElementType, std::size_t Extent = nostd::dynamic_extent>
using span = std::span<ElementType, Extent>;
Expand Down
26 changes: 20 additions & 6 deletions cmake/opentelemetry-build-external-component.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

function(get_directory_name_in_path PATH_VAR RESULT_VAR)
# get_filename_component does not work with paths ending in / or \, so remove it.
string(REGEX REPLACE "[/\\]$" "" PATH_TRIMMED "${PATH_VAR}")

get_filename_component(DIR_NAME ${PATH_TRIMMED} NAME)

set(${RESULT_VAR} "${DIR_NAME}" PARENT_SCOPE)
endfunction()

# Enable building external components through otel-cpp build
# The config options are
# - OPENTELEMETRY_EXTERNAL_COMPONENT_PATH - Setting local path of the external
# component as env variable
# - OPENTELEMETRY_EXTERNAL_COMPONENT_PATH - Setting local paths of the external
# component as env variable. Multiple paths can be set by separating them with.
# - OPENTELEMETRY_EXTERNAL_COMPONENT_URL Setting github-repo of external component
# as env variable

Expand All @@ -13,13 +22,18 @@
if(OPENTELEMETRY_EXTERNAL_COMPONENT_PATH)
# Add custom component path to build tree and consolidate binary artifacts in
# current project binary output directory.
add_subdirectory(${OPENTELEMETRY_EXTERNAL_COMPONENT_PATH}
${PROJECT_BINARY_DIR}/external)
foreach(DIR IN LISTS OPENTELEMETRY_EXTERNAL_COMPONENT_PATH)
get_directory_name_in_path(${DIR} EXTERNAL_EXPORTER_DIR_NAME)
add_subdirectory(${DIR} ${PROJECT_BINARY_DIR}/external/${EXTERNAL_EXPORTER_DIR_NAME})
endforeach()
elseif(DEFINED ENV{OPENTELEMETRY_EXTERNAL_COMPONENT_PATH})
# Add custom component path to build tree and consolidate binary artifacts in
# current project binary output directory.
add_subdirectory($ENV{OPENTELEMETRY_EXTERNAL_COMPONENT_PATH}
${PROJECT_BINARY_DIR}/external)
set(OPENTELEMETRY_EXTERNAL_COMPONENT_PATH_VAR $ENV{OPENTELEMETRY_EXTERNAL_COMPONENT_PATH})
foreach(DIR IN LISTS OPENTELEMETRY_EXTERNAL_COMPONENT_PATH_VAR)
get_directory_name_in_path(${DIR} EXTERNAL_EXPORTER_DIR_NAME)
add_subdirectory(${DIR} ${PROJECT_BINARY_DIR}/external/${EXTERNAL_EXPORTER_DIR_NAME})
endforeach()
elseif(DEFINED $ENV{OPENTELEMETRY_EXTERNAL_COMPONENT_URL})
# This option requires CMake 3.11+: add standard remote repo to build tree.
include(FetchContent)
Expand Down

0 comments on commit 93d0e5c

Please sign in to comment.