Skip to content
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
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,15 @@ jobs:
run: |
sudo ./ci/setup_grpc.sh
./ci/do_ci.sh cmake.exporter.otprotocol.test
- name: generate test cert
env:
CFSSL_VERSION: 1.6.3
run: |
sudo -E ./tools/setup-cfssl.sh
(cd ./functional/cert; ./generate_cert.sh)
- name: run func test
run: |
(cd ./functional/otlp; ./run_test.sh)

cmake_modern_protobuf_grpc_with_abseil_test:
name: CMake test (with modern protobuf,grpc and abseil)
Expand Down
6 changes: 6 additions & 0 deletions exporters/otlp/src/otlp_grpc_exporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ sdk::common::ExportResult OtlpGrpcExporter::Export(
else
{
#endif
const auto resource_spans_size = request->resource_spans_size();
grpc::Status status =
OtlpGrpcClient::DelegateExport(trace_service_stub_.get(), std::move(context),
std::move(arena), std::move(*request), response);
Expand All @@ -160,6 +161,11 @@ sdk::common::ExportResult OtlpGrpcExporter::Export(
<< "\" error_message: \"" << status.error_message() << "\"");
return sdk::common::ExportResult::kFailure;
}
else
{
OTEL_INTERNAL_LOG_DEBUG("[OTLP TRACE GRPC Exporter] Export " << resource_spans_size
<< " trace span(s) success");
}
#ifdef ENABLE_ASYNC_EXPORT
}
#endif
Expand Down
6 changes: 6 additions & 0 deletions functional/otlp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

include_directories(${CMAKE_SOURCE_DIR}/exporters/otlp/include)

if(WITH_OTLP_GRPC)
add_executable(func_otlp_grpc func_grpc_main.cc)
target_link_libraries(func_otlp_grpc ${CMAKE_THREAD_LIBS_INIT}
opentelemetry_trace opentelemetry_exporter_otlp_grpc)
endif()

if(WITH_OTLP_HTTP)
add_executable(func_otlp_http func_http_main.cc)
target_link_libraries(func_otlp_http ${CMAKE_THREAD_LIBS_INIT}
Expand Down
1 change: 1 addition & 0 deletions functional/otlp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
FROM otel/opentelemetry-collector
COPY . .
CMD ["--config", "/otel-cpp/otel-config.yaml"]
EXPOSE 4317
EXPOSE 4318
Loading
Loading