Skip to content
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

[BUILD] Add OTLP/file exporter for dll and examples #3231

Merged
merged 1 commit into from
Jan 8, 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
4 changes: 3 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

add_subdirectory(common)
include_directories(common)
if(WITH_OTLP_GRPC OR WITH_OTLP_HTTP)
if(WITH_OTLP_GRPC
OR WITH_OTLP_HTTP
OR WITH_OTLP_FILE)
add_subdirectory(otlp)
endif()
if(WITH_OTLP_GRPC)
Expand Down
16 changes: 16 additions & 0 deletions ext/src/dll/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ if(WITH_OTLP_HTTP)
PRIVATE opentelemetry_exporter_otlp_http)
endif()

if(WITH_OTLP_FILE)
add_compile_definitions(WITH_OTLP_FILE)
target_link_libraries(opentelemetry_cpp
PRIVATE opentelemetry_exporter_otlp_file)
endif()

target_link_libraries(
opentelemetry_cpp PRIVATE opentelemetry_metrics
opentelemetry_exporter_ostream_metrics)
Expand All @@ -36,6 +42,11 @@ if(WITH_OTLP_HTTP)
PRIVATE opentelemetry_exporter_otlp_http_metric)
endif()

if(WITH_OTLP_FILE)
target_link_libraries(opentelemetry_cpp
PRIVATE opentelemetry_exporter_otlp_file_metric)
endif()

target_link_libraries(
opentelemetry_cpp PRIVATE opentelemetry_logs
opentelemetry_exporter_ostream_logs)
Expand All @@ -50,6 +61,11 @@ if(WITH_OTLP_HTTP)
PRIVATE opentelemetry_exporter_otlp_http_log)
endif()

if(WITH_OTLP_FILE)
target_link_libraries(opentelemetry_cpp
PRIVATE opentelemetry_exporter_otlp_file_log)
endif()

find_program(
_vswhere_tool
NAMES vswhere
Expand Down
Loading