Skip to content

Commit

Permalink
[BUILD] Add OTLP/file exporter for dll and examples (#3231)
Browse files Browse the repository at this point in the history
  • Loading branch information
owent authored Jan 8, 2025
1 parent 3b89346 commit c33f800
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
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

1 comment on commit c33f800

@github-actions
Copy link

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp api Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: c33f800 Previous: 3b89346 Ratio
BM_SpinLockThrashing/1/process_time/real_time 0.260150668644669 ms/iter 0.12345607679260791 ms/iter 2.11
BM_SpinLockThrashing/2/process_time/real_time 0.5356829961140951 ms/iter 0.2483094500342387 ms/iter 2.16
BM_SpinLockThrashing/4/process_time/real_time 1.4393298249495656 ms/iter 0.6513725264800643 ms/iter 2.21

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.