|
|
|
@ -224,7 +224,7 @@ set(gRPC_ABSL_USED_TARGETS |
|
|
|
|
absl_meta |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
# The OpenTelemetry plugin support "package" build only at present. |
|
|
|
|
# The OpenTelemetry plugin supports "package" build only at present. |
|
|
|
|
set(gRPC_OPENTELEMETRY_PROVIDER "package") |
|
|
|
|
# set(gRPC_OPENTELEMETRY_PROVIDER "module" CACHE STRING "Provider of opentelemetry library") |
|
|
|
|
# set_property(CACHE gRPC_OPENTELEMETRY_PROVIDER PROPERTY STRINGS "module" "package") |
|
|
|
@ -1211,6 +1211,7 @@ if(gRPC_BUILD_TESTS) |
|
|
|
|
add_dependencies(buildtests_cxx orca_service_end2end_test) |
|
|
|
|
add_dependencies(buildtests_cxx orphanable_test) |
|
|
|
|
add_dependencies(buildtests_cxx osa_distance_test) |
|
|
|
|
add_dependencies(buildtests_cxx otel_plugin_test) |
|
|
|
|
add_dependencies(buildtests_cxx out_of_bounds_bad_client_test) |
|
|
|
|
add_dependencies(buildtests_cxx outlier_detection_lb_config_parser_test) |
|
|
|
|
add_dependencies(buildtests_cxx outlier_detection_test) |
|
|
|
@ -20581,6 +20582,72 @@ target_link_libraries(osa_distance_test |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endif() |
|
|
|
|
if(gRPC_BUILD_TESTS) |
|
|
|
|
|
|
|
|
|
add_executable(otel_plugin_test |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo.pb.cc |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo.grpc.pb.cc |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo.pb.h |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo.grpc.pb.h |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.pb.cc |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.grpc.pb.cc |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.pb.h |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.grpc.pb.h |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.pb.cc |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.grpc.pb.cc |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.pb.h |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.grpc.pb.h |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.pb.cc |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.grpc.pb.cc |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.pb.h |
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.grpc.pb.h |
|
|
|
|
src/cpp/ext/otel/otel_client_filter.cc |
|
|
|
|
src/cpp/ext/otel/otel_plugin.cc |
|
|
|
|
src/cpp/ext/otel/otel_server_call_tracer.cc |
|
|
|
|
test/cpp/end2end/test_service_impl.cc |
|
|
|
|
test/cpp/ext/otel/otel_plugin_test.cc |
|
|
|
|
test/cpp/ext/otel/otel_test_library.cc |
|
|
|
|
) |
|
|
|
|
if(WIN32 AND MSVC) |
|
|
|
|
if(BUILD_SHARED_LIBS) |
|
|
|
|
target_compile_definitions(otel_plugin_test |
|
|
|
|
PRIVATE |
|
|
|
|
"GPR_DLL_IMPORTS" |
|
|
|
|
"GRPC_DLL_IMPORTS" |
|
|
|
|
"GRPCXX_DLL_IMPORTS" |
|
|
|
|
) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
target_compile_features(otel_plugin_test PUBLIC cxx_std_14) |
|
|
|
|
target_include_directories(otel_plugin_test |
|
|
|
|
PRIVATE |
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR} |
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/include |
|
|
|
|
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} |
|
|
|
|
${_gRPC_RE2_INCLUDE_DIR} |
|
|
|
|
${_gRPC_SSL_INCLUDE_DIR} |
|
|
|
|
${_gRPC_UPB_GENERATED_DIR} |
|
|
|
|
${_gRPC_UPB_GRPC_GENERATED_DIR} |
|
|
|
|
${_gRPC_UPB_INCLUDE_DIR} |
|
|
|
|
${_gRPC_XXHASH_INCLUDE_DIR} |
|
|
|
|
${_gRPC_ZLIB_INCLUDE_DIR} |
|
|
|
|
third_party/googletest/googletest/include |
|
|
|
|
third_party/googletest/googletest |
|
|
|
|
third_party/googletest/googlemock/include |
|
|
|
|
third_party/googletest/googlemock |
|
|
|
|
${_gRPC_PROTO_GENS_DIR} |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
target_link_libraries(otel_plugin_test |
|
|
|
|
${_gRPC_ALLTARGETS_LIBRARIES} |
|
|
|
|
gtest |
|
|
|
|
opentelemetry-cpp::api |
|
|
|
|
opentelemetry-cpp::metrics |
|
|
|
|
grpc++_test_util |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endif() |
|
|
|
|
if(gRPC_BUILD_TESTS) |
|
|
|
|
|
|
|
|
|