-
Notifications
You must be signed in to change notification settings - Fork 304
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
HPCC-32131 Jtrace exporters batch config support #18807
HPCC-32131 Jtrace exporters batch config support #18807
Conversation
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-32131 Jirabot Action Result: |
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.
@rpastrana a few comments.
system/jlib/jtrace.cpp
Outdated
@@ -1323,12 +1333,12 @@ void CTraceManager::initTracerProviderAndGlobalInternals(const IPropertyTree * t | |||
enableDefaultLogExporter = traceConfig->getPropBool("enableDefaultLogExporter", enableDefaultLogExporter); | |||
} | |||
|
|||
if (enableDefaultLogExporter) | |||
{ | |||
//if (enableDefaultLogExporter) |
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.
Why is this commented out?
system/jlib/jtrace.cpp
Outdated
*/ | ||
options.max_export_batch_size = exportConfig->getPropInt("batch/@maxExportBatchSize", 512); | ||
|
||
DBGLOG("Tracing exporter set to batch mode"); |
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.
Logging at this point has caused problems in the past, probably better not to include.
system/jlib/jtrace.cpp
Outdated
@@ -1285,16 +1285,26 @@ std::unique_ptr<opentelemetry::sdk::trace::SpanProcessor> CTraceManager::createP | |||
if (!exporter) | |||
return nullptr; | |||
|
|||
if (exportConfig->getPropBool("batch/@enabled", false)) | |||
if (exportConfig->getPropBool("batch/@enabled", true)) |
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.
It would be better if the jlog (and OS?) exporter was not batched by default. Two possible ways of doing that relatively cleanly i) return an extra flag from createExporter or ii) use a dynamic cast to check if it is a logging class instance.
system/jlib/jtrace.cpp
Outdated
@@ -1285,7 +1288,11 @@ std::unique_ptr<opentelemetry::sdk::trace::SpanProcessor> CTraceManager::createP | |||
if (!exporter) | |||
return nullptr; | |||
|
|||
if (exportConfig->getPropBool("batch/@enabled", true)) | |||
if ( dynamic_cast<opentelemetry::exporter::trace::OStreamSpanExporterFactory * >(exporter.get()) != nullptr || |
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.
I don't like either approach, but included both so you can tell me which one you prefer, and hopefully avoid unnecessary back and forth discussion.
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.
I definitely prefer the boolean return value
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.
@rpastrana looks good. Please clean up and squash and I will merge
system/jlib/jtrace.cpp
Outdated
@@ -1285,7 +1288,11 @@ std::unique_ptr<opentelemetry::sdk::trace::SpanProcessor> CTraceManager::createP | |||
if (!exporter) | |||
return nullptr; | |||
|
|||
if (exportConfig->getPropBool("batch/@enabled", true)) | |||
if ( dynamic_cast<opentelemetry::exporter::trace::OStreamSpanExporterFactory * >(exporter.get()) != nullptr || |
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.
I definitely prefer the boolean return value
@@ -1159,7 +1159,7 @@ IProperties * getSpanContext(const ISpan * span) | |||
|
|||
//--------------------------------------------------------------------------------------------------------------------- | |||
|
|||
std::unique_ptr<opentelemetry::sdk::trace::SpanExporter> CTraceManager::createExporter(const IPropertyTree * exportConfig) | |||
std::unique_ptr<opentelemetry::sdk::trace::SpanExporter> CTraceManager::createExporter(const IPropertyTree * exportConfig, bool & shouldBatch) | |||
{ | |||
assertex(exportConfig); |
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.
Should probably assign true in the function as a default.
- Enables span batch export mode by default for remote exporters - Exposes batch configuration options - Updates sample otel export values files to include batch config - Updates helm schema to expose batch confi Signed-off-by: Rodrigo Pastrana <[email protected]>
d267207
to
7fcb208
Compare
a7aeeb7
into
hpcc-systems:candidate-9.4.x
Type of change:
Checklist:
Smoketest:
Testing: