Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ConnectionStrings": {
"ServerlessYDB": "UseTls=true;Host=ydb.serverless.yandexcloud.net;Port=2135;Database=/ru-central1/b1g8skpblkos03malf3s/etnl7uv72neobbgiahii"
"ServerlessYDB": "UseTls=true;Host=<host>;Port=2135;Database=<database>"
}
}
6 changes: 4 additions & 2 deletions slo/playground/configs/chaos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ echo "Start CHAOS YDB cluster!"

for i in $(seq 1 5)
do
echo "docker stop/start iteration $i"
echo "[$(date)]: docker stop/start iteration $i"

get_random_container

Expand All @@ -36,7 +36,7 @@ done

for i in $(seq 1 3)
do
echo "docker restart iteration $i"
echo "[$(date)]: docker restart iteration $i"

get_random_container

Expand All @@ -47,4 +47,6 @@ done

get_random_container

echo "[$(date)]: docker kill -s SIGKILL ${nodeForChaos}"

sh -c "docker kill -s SIGKILL ${nodeForChaos}"
5 changes: 5 additions & 0 deletions slo/playground/configs/ydb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ blob_storage_config:
- node_id: 1
path: SectorMap:1:64
pdisk_category: SSD
# enable grpc server logs
#log_config:
# entry:
# - component: GRPC_SERVER
# level: 8
channel_profile_config:
profile:
- channel:
Expand Down
5 changes: 4 additions & 1 deletion slo/src/Internal/Internal.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@

<ItemGroup>
<ProjectReference Include="..\..\..\src\Ydb.Sdk\src\Ydb.Sdk.csproj"/>
<None Update="nlog.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0"/>
<PackageReference Include="NLog.Extensions.Logging" Version="5.5.0"/>
<PackageReference Include="prometheus-net" Version="8.0.1"/>
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1"/>
<PackageReference Include="System.Threading.RateLimiting" Version="8.0.0" />
Expand Down
8 changes: 5 additions & 3 deletions slo/src/Internal/SloTableContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Security.Cryptography;
using System.Threading.RateLimiting;
using Microsoft.Extensions.Logging;
using NLog.Extensions.Logging;
using Prometheus;
using Ydb.Sdk;

Expand All @@ -13,9 +14,10 @@ public interface ISloContext
public static readonly ILoggerFactory Factory =
LoggerFactory.Create(builder =>
{
builder.AddConsole().SetMinimumLevel(LogLevel.Information);
builder.AddFilter("Ydb.Sdk.Ado", LogLevel.Debug);
builder.AddFilter("Ydb.Sdk.Services.Query", LogLevel.Debug);
builder.AddNLog()
.SetMinimumLevel(LogLevel.Information)
.AddFilter("Ydb.Sdk.Ado", LogLevel.Debug)
.AddFilter("Ydb.Sdk.Services.Query", LogLevel.Debug);
});


Expand Down
15 changes: 15 additions & 0 deletions slo/src/Internal/nlog.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>

<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<targets>
<target xsi:type="Console" name="ConsoleTarget"
layout="${longdate} ${level:uppercase=true} ${logger} - ${message}${onexception:${newline}${exception:format=ToString}}">
</target>
</targets>

<rules>
<logger name="*" minlevel="Info" writeTo="ConsoleTarget" />
</rules>
</nlog>
Loading