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
5 changes: 2 additions & 3 deletions ydb/core/cms/console/jaeger_tracing_configurator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ TJaegerTracingConfigurator::TJaegerTracingConfigurator(
: TracingConfigurator(std::move(tracingConfigurator))
{
if (auto err = ApplyConfigs(cfg)) {
Cerr << "Failed to apply initial tracing configs: " << *err << Endl;
Y_ABORT_UNLESS(false, "Failed to apply initial tracing configs: %s", err->c_str());
}
}

Expand All @@ -65,8 +65,7 @@ void TJaegerTracingConfigurator::Handle(TEvConsole::TEvConfigNotificationRequest

auto resp = MakeHolder<TEvConsole::TEvConfigNotificationResponse>(rec);
LOG_TRACE_S(ctx, NKikimrServices::CMS_CONFIGS,
"TJaegerTracingConfigurator: Send TEvConfigNotificationResponse: "
<< resp->Record.ShortDebugString());
"TJaegerTracingConfigurator: Send TEvConfigNotificationResponse");
ctx.Send(ev->Sender, resp.Release(), 0, ev->Cookie);
}

Expand Down
4 changes: 3 additions & 1 deletion ydb/core/driver_lib/run/kikimr_services_initializers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,8 @@ void TBasicServicesInitializer::InitializeServices(NActors::TActorSystemSetup* s
switch (tracing_backend.GetBackendCase()) {
case NKikimrConfig::TTracingConfig::TBackendConfig::BackendCase::kOpentelemetry: {
const auto& opentelemetry = tracing_backend.GetOpentelemetry();
Y_ABORT_UNLESS(opentelemetry.HasCollectorUrl() && opentelemetry.HasServiceName(),
"Both collector_url and service_name should be present in opentelemetry backedn config");
wilsonUploader = NWilson::WilsonUploaderParams {
.CollectorUrl = opentelemetry.GetCollectorUrl(),
.ServiceName = opentelemetry.GetServiceName(),
Expand All @@ -846,7 +848,7 @@ void TBasicServicesInitializer::InitializeServices(NActors::TActorSystemSetup* s
}

case NKikimrConfig::TTracingConfig::TBackendConfig::BackendCase::BACKEND_NOT_SET: {
Y_DEBUG_ABORT_UNLESS(false, "No backend option was provided in backend config");
Y_ABORT_UNLESS(false, "No backend option was provided in backend config");
break;
}
}
Expand Down
10 changes: 5 additions & 5 deletions ydb/core/jaeger_tracing/sampling_throttling_configurator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ TMaybe<TString> TSamplingThrottlingConfigurator::HandleConfigs(const NKikimrConf

if (config.SamplingSize() == 1) {
const auto& samplingConfig = config.GetSampling(0);
if (!(samplingConfig.HasFraction() && samplingConfig.HasLevel() && samplingConfig.HasMaxRatePerMinute() && samplingConfig.HasMaxBurst())) {
return "At least one required field is missing in scope " + samplingConfig.ShortDebugString();
if (!(samplingConfig.HasFraction() && samplingConfig.HasLevel() && samplingConfig.HasMaxRatePerMinute())) {
return "At least one required field (fraction, level, max_rate_per_minute) is missing in scope " + samplingConfig.ShortDebugString();
}
const auto samplingFraction = samplingConfig.GetFraction();

if (samplingFraction < 0 || samplingFraction > 1) {
return "Fraction violates range [0, 1] " + ToString(samplingFraction);
return "Sampling fraction violates range [0, 1] " + ToString(samplingFraction);
}

SamplingPPM.Set(samplingFraction * 1000000);
Expand All @@ -44,8 +44,8 @@ TMaybe<TString> TSamplingThrottlingConfigurator::HandleConfigs(const NKikimrConf

if (config.ExternalThrottlingSize()) {
const auto& throttlingConfig = config.externalthrottling(0);
if (!(throttlingConfig.HasMaxRatePerMinute() && throttlingConfig.HasMaxBurst())) {
return "At least one required field is missing in scope " + throttlingConfig.ShortDebugString();
if (!throttlingConfig.HasMaxRatePerMinute()) {
return "max_rate_per_minute is missing in this scope: " + throttlingConfig.ShortDebugString();
}

MaxExternalPerMinute.Set(throttlingConfig.GetMaxRatePerMinute());
Expand Down
28 changes: 15 additions & 13 deletions ydb/core/protos/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1571,8 +1571,8 @@ message TTracingConfig {
message TTvmAuth {
optional string Url = 1;

required uint32 SelfTvmId = 2;
required uint32 TracingTvmId = 3;
optional uint32 SelfTvmId = 2;
optional uint32 TracingTvmId = 3;

optional string DiskCacheDir = 4;

Expand All @@ -1589,8 +1589,8 @@ message TTracingConfig {
}

message TOpentelemetryBackend {
required string CollectorUrl = 1;
required string ServiceName = 2;
optional string CollectorUrl = 1;
optional string ServiceName = 2;
}


Expand All @@ -1606,21 +1606,23 @@ message TTracingConfig {

message TSamplingScope {
optional TSelectors Scope = 1;
required float Fraction = 2;
required uint32 Level = 3;
required uint32 MaxRatePerMinute = 4;
required uint32 MaxBurst = 5;
optional float Fraction = 2;
optional uint32 Level = 3;
optional uint32 MaxRatePerMinute = 4;
optional uint32 MaxBurst = 5;
}

message TExternalThrottlingScope {
optional TSelectors Scope = 1;
required uint32 MaxRatePerMinute = 2;
required uint32 MaxBurst = 3;
optional uint32 MaxRatePerMinute = 2;
optional uint32 MaxBurst = 3;
}

required TBackendConfig Backend = 1;
repeated TSamplingScope Sampling = 2;
repeated TExternalThrottlingScope ExternalThrottling = 3;
reserved 1 to 5;

optional TBackendConfig Backend = 6;
repeated TSamplingScope Sampling = 7;
repeated TExternalThrottlingScope ExternalThrottling = 8;
}

message TFailureInjectionConfig {
Expand Down
4 changes: 2 additions & 2 deletions ydb/tools/cfg/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
max_rate_per_minute=dict(type="integer", minimum=0),
max_burst=dict(type="integer", minimum=0),
),
required=["fraction", "level", "max_rate_per_minute", "max_burst"],
required=["fraction", "level", "max_rate_per_minute"],
),
),
external_throttling=dict(
Expand All @@ -192,7 +192,7 @@
max_rate_per_minute=dict(type="integer", minimum=0),
max_burst=dict(type="integer", minimum=0),
),
required=["max_rate_per_minute", "max_burst"],
required=["max_rate_per_minute"],
),
),
),
Expand Down