-
Notifications
You must be signed in to change notification settings - Fork 417
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
Added feature flag for asynchronous export #1295
Changes from 1 commit
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 |
---|---|---|
|
@@ -87,6 +87,7 @@ class OtlpHttpExporter final : public opentelemetry::sdk::trace::SpanExporter | |
const nostd::span<std::unique_ptr<opentelemetry::sdk::trace::Recordable>> &spans) noexcept | ||
override; | ||
|
||
#ifdef ENABLE_ASYNC_EXPORT | ||
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. Could you please also put 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. Done |
||
/** | ||
* Exports a batch of span recordables asynchronously. | ||
* @param spans a span of unique pointers to span recordables | ||
|
@@ -96,6 +97,7 @@ class OtlpHttpExporter final : public opentelemetry::sdk::trace::SpanExporter | |
const nostd::span<std::unique_ptr<opentelemetry::sdk::trace::Recordable>> &spans, | ||
std::function<bool(opentelemetry::sdk::common::ExportResult)> &&result_callback) noexcept | ||
override; | ||
#endif | ||
|
||
/** | ||
* Shut down the exporter. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,6 +88,7 @@ class OtlpHttpLogExporter final : public opentelemetry::sdk::logs::LogExporter | |
const nostd::span<std::unique_ptr<opentelemetry::sdk::logs::Recordable>> &records) noexcept | ||
override; | ||
|
||
# ifdef ENABLE_ASYNC_EXPORT | ||
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. Could you please also remove 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. Done |
||
/** | ||
* Exports a vector of log records asynchronously. | ||
* @param records A list of log records. | ||
|
@@ -97,6 +98,7 @@ class OtlpHttpLogExporter final : public opentelemetry::sdk::logs::LogExporter | |
const nostd::span<std::unique_ptr<opentelemetry::sdk::logs::Recordable>> &records, | ||
std::function<bool(opentelemetry::sdk::common::ExportResult)> &&result_callback) noexcept | ||
override; | ||
# endif | ||
|
||
/** | ||
* Shutdown this exporter. | ||
|
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.
We should also add INTERFACE definitions into api/CMakeLists.txt.
So that when we use optentelemetry-cpp as a cmake module(
find_package(opentelemetry-cpp CONFIG)
) , this definition can be auto added into all targets that direct or indirectly depend onopentelemetry-cpp
.I find there are severval missing definitions in api/CMakeLists.txt and be add by
add_definitions()
. All definitions should be added bytarget_compile_definitions(opentelemetry_api INTERFACE ...)
to be expoted by cmake.We should avoid to use
add_definitions(...)
unless the definitions is only used by unit tests, should I create another issue to fix it? @lalitb @ThomsonTanThere 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.
Added.