Skip to content

Commit 6af229b

Browse files
committed
summ more testing
1 parent 1db4e3e commit 6af229b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

x/x.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <conio.h>
2-
31
#include <thread>
42
#include <condition_variable>
53
#include <mutex>
@@ -60,8 +58,6 @@
6058
#include <opentelemetry/exporters/otlp/otlp_grpc_exporter_factory.h>
6159
#include <opentelemetry/exporters/otlp/otlp_grpc_log_record_exporter_factory.h>
6260

63-
#include <windows.h>
64-
6561
opentelemetry::nostd::shared_ptr<opentelemetry::trace::Tracer> get_tracer()
6662
{
6763
auto provider = opentelemetry::trace::Provider::GetTracerProvider();
@@ -393,15 +389,16 @@ struct proxy_thread
393389

394390
OtlpGrpcClientOptions clientOptions;
395391
clientOptions.endpoint = GetOtlpDefaultGrpcEndpoint();
396-
clientOptions.max_concurrent_requests = 1024;
392+
clientOptions.max_concurrent_requests = 16384;
393+
clientOptions.max_threads = 64;
397394

398395
ctx->proxy = std::make_unique<OtlpGrpcForwardProxy>(clientOptions);
399396
ctx->proxy->SetActive(true);
400397

401398
ctx->proxy->AddListenAddress("127.0.0.1:4317");
402-
proxy->RegisterMetricExporter(OtlpGrpcForwardProxy::ExportMode::AsyncBlockOnFull);
403-
proxy->RegisterTraceExporter(OtlpGrpcForwardProxy::ExportMode::AsyncBlockOnFull);
404-
proxy->RegisterLogRecordExporter(OtlpGrpcForwardProxy::ExportMode::AsyncBlockOnFull);
399+
proxy->RegisterMetricExporter(OtlpGrpcForwardProxy::ExportMode::AsyncDropOnFull);
400+
proxy->RegisterTraceExporter(OtlpGrpcForwardProxy::ExportMode::AsyncDropOnFull);
401+
proxy->RegisterLogRecordExporter(OtlpGrpcForwardProxy::ExportMode::AsyncDropOnFull);
405402
printf("Start\n");
406403
ctx->proxy->Start();
407404
{
@@ -441,8 +438,11 @@ int main(int argc, const char *argv[])
441438
}
442439

443440
proxy_thread::start();
444-
445-
opentelemetry::sdk::common::setenv( "OTEL_EXPORTER_OTLP_ENDPOINT", "http://127.0.0.1:4317", 1 /* override */ );
441+
442+
{
443+
using namespace opentelemetry::sdk::common;
444+
setenv( "OTEL_EXPORTER_OTLP_ENDPOINT", "http://127.0.0.1:4317", 1 /* override */ );
445+
}
446446

447447
std::string metrics_name{"malkia_metrics_test"};
448448
InitTracer();
@@ -464,7 +464,7 @@ int main(int argc, const char *argv[])
464464

465465
printf("Press Ctrl+C to break\n");
466466
try {
467-
std::this_thread::sleep_for(std::chrono::seconds(600));
467+
std::this_thread::sleep_for(std::chrono::seconds(500));
468468
}
469469
catch( ... )
470470
{

0 commit comments

Comments
 (0)