-
Notifications
You must be signed in to change notification settings - Fork 92
build(clp_s::ffi::sfa): Add search dependencies and make OpenTelemetry and Libarchive optional for downstream WebAssembly. #2474
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
base: main
Are you sure you want to change the base?
Changes from all commits
35e993e
c143951
e139377
c1916f4
e351129
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -18,6 +18,7 @@ if(CLP_BUILD_CLP_S_FFI_SFA) | |||
| clp_s_ffi_sfa | ||||
| PUBLIC | ||||
| clp_s::archive_reader | ||||
| clp_s::search | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Not used in this PR? Should probably be part of the PR where you add search to the ffi. |
||||
| ystdlib::error_handling | ||||
| PRIVATE | ||||
| spdlog::spdlog | ||||
|
|
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,9 +21,7 @@ set( | |
| QueryRunner.hpp | ||
| SchemaMatch.cpp | ||
| SchemaMatch.hpp | ||
| SearchTelemetry.cpp | ||
| SearchTelemetry.hpp | ||
| TelemetryContext.cpp | ||
| TelemetryContext.hpp | ||
| ) | ||
|
|
||
|
|
@@ -47,11 +45,30 @@ if(CLP_BUILD_CLP_S_SEARCH) | |
| clp::string_utils | ||
| clp_s::clp_dependencies | ||
| clp_s::io | ||
| opentelemetry-cpp::api | ||
| opentelemetry-cpp::otlp_http_exporter | ||
| opentelemetry-cpp::resources | ||
| opentelemetry-cpp::trace | ||
| spdlog::spdlog | ||
| xxHash::xxhash | ||
| ) | ||
| if(CLP_BUILD_CLP_S_SEARCH_ENABLE_OPENTELEMETRY_CPP) | ||
| target_sources( | ||
| clp_s_search | ||
| PRIVATE | ||
| SearchTelemetry.cpp | ||
| TelemetryContext.cpp | ||
| ) | ||
| target_link_libraries( | ||
| clp_s_search | ||
| PRIVATE | ||
| opentelemetry-cpp::api | ||
| opentelemetry-cpp::otlp_http_exporter | ||
| opentelemetry-cpp::resources | ||
| opentelemetry-cpp::trace | ||
| xxHash::xxhash | ||
| ) | ||
| else() | ||
| target_sources( | ||
| clp_s_search | ||
| PRIVATE | ||
| SearchTelemetryNoop.cpp | ||
| TelemetryContextNoop.cpp | ||
|
Comment on lines
+70
to
+71
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of adding new cpp files let's use the more standard approach of doing: Then use |
||
| ) | ||
| endif() | ||
| endif() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #include <memory> | ||
| #include <optional> | ||
| #include <string_view> | ||
|
|
||
| #include "SearchTelemetry.hpp" | ||
|
|
||
| namespace clp_s::search { | ||
| class SearchTelemetrySpan::Impl {}; | ||
|
|
||
| SearchTelemetrySpan::SearchTelemetrySpan() : m_impl{std::make_unique<Impl>()} {} | ||
|
|
||
| SearchTelemetrySpan::~SearchTelemetrySpan() = default; | ||
|
|
||
| auto SearchTelemetrySpan::set_archive_context(std::string_view) -> void {} | ||
|
|
||
| auto SearchTelemetrySpan::set_error(std::string_view) -> void {} | ||
|
|
||
| auto SearchTelemetrySpan::set_query_context(std::string_view) -> void {} | ||
|
|
||
| auto SearchTelemetrySpan::set_query_shape_metrics(QueryShapeMetrics const&) -> void {} | ||
|
|
||
| auto SearchTelemetrySpan::set_search_result_metrics(SearchResultMetrics const&) -> void {} | ||
|
|
||
| auto SearchTelemetrySpan::set_termination_stage(std::string_view) -> void {} | ||
|
|
||
| auto QueryShapeMetrics::create( | ||
| std::shared_ptr<ast::Expression> const&, | ||
| std::optional<epochtime_t>, | ||
| std::optional<epochtime_t> | ||
| ) -> QueryShapeMetrics { | ||
| return {}; | ||
| } | ||
| } // namespace clp_s::search |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #include <memory> | ||
|
|
||
| #include "TelemetryContext.hpp" | ||
|
|
||
| namespace clp_s::search { | ||
| class TelemetryContext::Impl {}; | ||
|
|
||
| TelemetryContext::TelemetryContext() : m_impl{std::make_unique<Impl>()} {} | ||
|
|
||
| TelemetryContext::~TelemetryContext() = default; | ||
| } // namespace clp_s::search |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we rename the flag (and other corresponding functions, etc.) to this? If we did add opentelemetry support to other parts of clp-s we'd probably want to share the same flag, instead of relying on a different flag for each sub-component, so we might as well just create a flag at the clp-s level now.