Skip to content

[Geneva] Update opentelemetry-cpp to 1.21.0 #552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/fluentd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: "open-telemetry/opentelemetry-cpp"
ref: "v1.19.0"
ref: "v1.21.0"
path: "opentelemetry-cpp"
submodules: "recursive"
- name: setup dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/geneva_metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: "open-telemetry/opentelemetry-cpp"
ref: "v1.20.0"
ref: "v1.21.0"
path: "otel_cpp"
submodules: "recursive"
- name: setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/user_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: "open-telemetry/opentelemetry-cpp"
ref: "v1.20.0"
ref: "v1.21.0"
path: "opentelemetry-cpp"
submodules: "recursive"
- name: setup dependencies
Expand Down
49 changes: 36 additions & 13 deletions exporters/fluentd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,42 @@ if (WITH_EXAMPLES)
endif()

if(OPENTELEMETRY_INSTALL)
install(
TARGETS opentelemetry_exporter_geneva_logs
opentelemetry_exporter_geneva_trace
EXPORT "${PROJECT_NAME}-target"
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})

install(
DIRECTORY include/opentelemetry/exporters/
DESTINATION include/opentelemetry/exporters/
FILES_MATCHING
PATTERN "*.h")
if(MAIN_PROJECT)
install(
TARGETS opentelemetry_exporter_geneva_logs
opentelemetry_exporter_geneva_trace
EXPORT "${PROJECT_NAME}-target"
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})

install(
DIRECTORY include/opentelemetry/exporters/
DESTINATION include/opentelemetry/exporters/
FILES_MATCHING
PATTERN "*.h")
else()
set_target_properties(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a future PR these target properties can be moved to above the MAIN_PROJECT conditional so the export name of the targets is the same for both cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed it in the new PR below.

#553

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I've added some comments. These export name properties are good to set unconditionally after add_library.

opentelemetry_exporter_geneva_trace
PROPERTIES
EXPORT_NAME opentelemetry_exporter_geneva_trace)
set_target_properties(
opentelemetry_exporter_geneva_logs
PROPERTIES
EXPORT_NAME opentelemetry_exporter_geneva_logs)
otel_add_component(
COMPONENT
exporters_geneva_fluentd
TARGETS
opentelemetry_exporter_geneva_logs
opentelemetry_exporter_geneva_trace
FILES_DIRECTORY
"include/opentelemetry/exporters/"
FILES_DESTINATION
"include/opentelemetry/exporters"
FILES_MATCHING
PATTERN "*.h")
endif()
endif()

if(BUILD_TESTING)
Expand Down
41 changes: 32 additions & 9 deletions exporters/geneva-trace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,39 @@ if(WITH_EXAMPLES)
endif()

if(OPENTELEMETRY_INSTALL)
install(DIRECTORY include/ DESTINATION include)
if(MAIN_PROJECT)
install(DIRECTORY include/ DESTINATION include)

install(
TARGETS opentelemetry_exporter_geneva_trace opentelemetry_exporter_geneva_logs
EXPORT "${PROJECT_NAME}-target")

if(NOT MAIN_PROJECT)
install(
EXPORT "${PROJECT_NAME}-target"
NAMESPACE "${PROJECT_NAME}::"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
TARGETS opentelemetry_exporter_geneva_trace opentelemetry_exporter_geneva_logs
EXPORT "${PROJECT_NAME}-target")

if(NOT MAIN_PROJECT)
install(
EXPORT "${PROJECT_NAME}-target"
NAMESPACE "${PROJECT_NAME}::"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
endif()
else()
set_target_properties(
opentelemetry_exporter_geneva_trace
PROPERTIES EXPORT_NAME opentelemetry_exporter_geneva_trace)
set_target_properties(
opentelemetry_exporter_geneva_logs
PROPERTIES EXPORT_NAME opentelemetry_exporter_geneva_logs)

otel_add_component(
COMPONENT
exporters_geneva_trace_logs
TARGETS
opentelemetry_exporter_geneva_trace
opentelemetry_exporter_geneva_logs
FILES_DIRECTORY
"include/opentelemetry/exporters/geneva"
FILES_DESTINATION
"include/opentelemetry/exporters/geneva"
FILES_MATCHING
PATTERN
"*.h")
endif()
endif()
2 changes: 1 addition & 1 deletion exporters/geneva-trace/third_party/opentelemetry-cpp
Submodule opentelemetry-cpp updated 316 files
22 changes: 22 additions & 0 deletions exporters/geneva/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ if(BUILD_TESTING)
endif()

if(OPENTELEMETRY_INSTALL)

if(MAIN_PROJECT)

install(
TARGETS opentelemetry_exporter_geneva_metrics
EXPORT "${PROJECT_NAME}-target"
Expand All @@ -103,6 +106,25 @@ if(OPENTELEMETRY_INSTALL)
DESTINATION include/opentelemetry/exporters
FILES_MATCHING
PATTERN "*.h")

else()

set_target_properties(opentelemetry_exporter_geneva_metrics PROPERTIES EXPORT_NAME opentelemetry_exporter_geneva_metrics)

otel_add_component(
COMPONENT
exporters_geneva_metrics
TARGETS
opentelemetry_exporter_geneva_metrics
FILES_DIRECTORY
"include/opentelemetry/exporters/geneva"
FILES_DESTINATION
"include/opentelemetry/exporters"
FILES_MATCHING
PATTERN
"*.h")

endif()
endif()

if(WITH_EXAMPLES)
Expand Down
25 changes: 25 additions & 0 deletions exporters/user_events/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ if(WITH_BENCHMARK)
opentelemetry_exporter_user_events_logs)
endif()

if(MAIN_PROJECT)

install(
TARGETS opentelemetry_exporter_user_events_logs
EXPORT "${PROJECT_NAME}-target"
Expand All @@ -148,3 +150,26 @@ install(
DESTINATION include/opentelemetry/exporters
FILES_MATCHING
PATTERN "*.h")
else()
set_target_properties(
opentelemetry_exporter_user_events_logs
PROPERTIES
EXPORT_NAME opentelemetry_exporter_user_events_logs)
set_target_properties(
opentelemetry_exporter_user_events_metrics
PROPERTIES
EXPORT_NAME opentelemetry_exporter_user_events_metrics)
otel_add_component(
COMPONENT
exporters_user_events
TARGETS
opentelemetry_exporter_user_events_logs
opentelemetry_exporter_user_events_metrics
FILES_DIRECTORY
"include/opentelemetry/exporters/user_events"
FILES_DESTINATION
"include/opentelemetry/exporters"
FILES_MATCHING
PATTERN
"*.h")
endif()