inicio bases

This commit is contained in:
2025-09-01 22:25:21 +02:00
parent 152904671a
commit 895e40edc0
12 changed files with 282 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
{
"HealthChecksConfigs": {
"CacheDuration": "00:30:00",
"Timeout": "00:00:05",
"AssembliesToScan": [
"back"
]
//"MyCheck": {
// "RetryAttempts": 2,
// "Timeout": "00:05:00",
// "RetryDelay": "00:00:10",
// "Severity": "Info"
//}
}
}

41
back/configs/serilog.json Normal file
View File

@@ -0,0 +1,41 @@
{
"Serilog": {
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Sinks.OpenTelemetry" ],
"MinimumLevel": {
"Default": "Information"
},
"WriteTo": [
{
"Name": "Console"
},
{
"Name": "File",
"Args": {
"path": "Logs/log-.txt",
"rollingInterval": "Day",
"fileSizeLimitBytes": 5242880,
"rollOnFileSizeLimit": true,
"retainedFileCountLimit": 31,
"outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "OpenTelemetry",
"Args": {
"endpoint": "http://localhost:4317",
"protocol": "Grpc",
"resourceAttributes": {
"service.name": "back.mmorales.photo",
"deployment.environment": "development"
}
}
}
],
"Enrich": [
"FromLogContext",
"WithThreadId",
"WithProcessId",
"WithEnvironmentName"
]
}
}