Logger mejorado para ver emojis y tildes

This commit is contained in:
2025-11-06 00:46:05 +01:00
parent fa93504101
commit 65f2585c59
2 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ class LokiLogger:
if add_fields:
log_line_data.update(add_fields)
log_line = json.dumps(log_line_data)
log_line = json.dumps(log_line_data, ensure_ascii=False)
body = {
"streams": [
+6 -7
View File
@@ -51,7 +51,7 @@ prometheus.scrape "tempo" {
job_name = "tempo"
}
// Receptor para métricas externas (aplicaciones que envían métricas)
// Receptor para métricas externas
prometheus.receive_http "external_metrics" {
http {
listen_address = "0.0.0.0"
@@ -60,7 +60,7 @@ prometheus.receive_http "external_metrics" {
forward_to = [prometheus.remote_write.prometheus.receiver]
}
// Remote write a Prometheus
// Remote write hacia Prometheus
prometheus.remote_write "prometheus" {
endpoint {
url = "http://prometheus:9090/api/v1/write"
@@ -100,12 +100,14 @@ loki.relabel "docker" {
}
}
// Receptor HTTP para logs externos
// Receptor HTTP para logs externos (como tus logs Python)
loki.source.api "external_logs" {
http {
listen_address = "0.0.0.0"
listen_port = 3101
}
// ⚙️ Enviar los logs directamente al escritor Loki
forward_to = [loki.write.loki.receiver]
}
@@ -129,13 +131,10 @@ loki.relabel "syslog" {
}
// Cliente Loki - destino final
// ⚠️ Sin http_headers (no soportado aún en Alloy estable)
loki.write "loki" {
endpoint {
url = "http://loki:3100/loki/api/v1/push"
http_headers = {
"Content-Type" = ["application/json; charset=utf-8"]
"Accept-Charset" = ["utf-8"]
}
}
}