Mejoras de sesion: estabilizacion, IA, Nexus Yonke y marketplace B2B
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled

- F0 blindaje: Redis/Celery, pg_hba sin trust LAN, secretos a env 600, backups, webhook auth, jobs muertos
- F1 caja: bugs POS, reembolsos al corte, apartados, CFDI, topes de descuento en cotizacion/apartado
- F2/F7 IA de catalogo: autocategorizacion, dedup de SKUs con embeddings, OCR de facturas, descripciones, claves SAT, limpieza de fitment
- F3 IA en el flujo: vision Yonke, preguntas MeLi, venta cruzada, anomalias, sinonimos, busqueda semantica (rerank/embeddings)
- F4/F8 escala y cartera: /metrics+Prometheus+Grafana, pool, score de credito, churn, metricas multi-tenant
- Nexus Yonke (M1-M6): modelo de datos 1-de-1, alta por donador, vitrina publica, MeLi usado, consignacion, garantia por dias, reportes, etiquetas
- Marketplace B2B entre yonkes (catalogo + pedidos cross-tenant)
- Seguridad: auth en /api/admin/* (35 endpoints), alertas por tenant
- Migraciones v4.27/v4.28; timers expire-demos y rollup-metrics
This commit is contained in:
2026-10-12 00:57:31 +00:00
parent f2d4558b80
commit a386ca5b4a
165 changed files with 31313 additions and 2203 deletions

View File

@@ -1,7 +1,7 @@
{
"uid": "nexus-app",
"title": "Nexus — Application",
"tags": ["gunicorn", "flask"],
"tags": ["app", "flask", "nexus"],
"timezone": "browser",
"schemaVersion": 36,
"refresh": "30s",
@@ -26,15 +26,15 @@
"panels": [
{
"id": 1,
"title": "Request Rate (nginx)",
"title": "Request Rate (by app / status)",
"type": "timeseries",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
"datasource": {"type": "prometheus", "uid": "${datasource}"},
"targets": [
{
"datasource": {"type": "prometheus", "uid": "${datasource}"},
"expr": "rate(nginx_http_requests_total[5m])",
"legendFormat": "Requests/sec",
"expr": "sum by (app, status) (rate(nexus_http_requests_total[5m]))",
"legendFormat": "{{app}} {{status}}",
"refId": "A"
}
],
@@ -49,20 +49,20 @@
},
{
"id": 2,
"title": "Response Time (nginx)",
"title": "Response Time p95 / p99",
"type": "timeseries",
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
"datasource": {"type": "prometheus", "uid": "${datasource}"},
"targets": [
{
"datasource": {"type": "prometheus", "uid": "${datasource}"},
"expr": "histogram_quantile(0.95, sum(rate(nginx_http_request_duration_seconds_bucket[5m])) by (le))",
"expr": "histogram_quantile(0.95, sum by (le) (rate(nexus_http_request_duration_seconds_bucket[5m])))",
"legendFormat": "p95",
"refId": "A"
},
{
"datasource": {"type": "prometheus", "uid": "${datasource}"},
"expr": "histogram_quantile(0.99, sum(rate(nginx_http_request_duration_seconds_bucket[5m])) by (le))",
"expr": "histogram_quantile(0.99, sum by (le) (rate(nexus_http_request_duration_seconds_bucket[5m])))",
"legendFormat": "p99",
"refId": "B"
}
@@ -78,15 +78,15 @@
},
{
"id": 3,
"title": "Active Workers",
"title": "In-flight Requests",
"type": "timeseries",
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 8},
"datasource": {"type": "prometheus", "uid": "${datasource}"},
"targets": [
{
"datasource": {"type": "prometheus", "uid": "${datasource}"},
"expr": "count by (instance) (node_processes_state{state=\"S\", cmdline=~\".*gunicorn.*\"})",
"legendFormat": "Workers {{instance}}",
"expr": "sum by (app) (nexus_http_requests_in_flight)",
"legendFormat": "{{app}}",
"refId": "A"
}
],
@@ -108,8 +108,8 @@
"targets": [
{
"datasource": {"type": "prometheus", "uid": "${datasource}"},
"expr": "rate(nginx_http_requests_total{status=~\"5..\"}[5m])",
"legendFormat": "5xx/sec",
"expr": "sum by (app) (rate(nexus_http_requests_total{status=\"5xx\"}[5m]))",
"legendFormat": "{{app}} 5xx/s",
"refId": "A"
}
],
@@ -124,22 +124,22 @@
},
{
"id": 5,
"title": "Memory per Worker",
"title": "Master DB Connections",
"type": "timeseries",
"gridPos": {"h": 8, "w": 24, "x": 0, "y": 16},
"datasource": {"type": "prometheus", "uid": "${datasource}"},
"targets": [
{
"datasource": {"type": "prometheus", "uid": "${datasource}"},
"expr": "process_resident_memory_bytes{cmdline=~\".*gunicorn.*\"} / 1024 / 1024",
"legendFormat": "{{cmdline}}",
"expr": "nexus_db_connections",
"legendFormat": "{{app}} ({{database}})",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {"drawStyle": "line", "lineWidth": 2, "fillOpacity": 10},
"unit": "mbytes",
"unit": "short",
"min": 0
},
"overrides": []