diff --git a/k8s/grafana/dashboards/obs-distributed-traces.json b/k8s/grafana/dashboards/obs-distributed-traces.json index fda4fd2..0b0e739 100644 --- a/k8s/grafana/dashboards/obs-distributed-traces.json +++ b/k8s/grafana/dashboards/obs-distributed-traces.json @@ -23,31 +23,36 @@ "name": "traceFilter", "label": "Show", "type": "custom", - "query": "Transactions — 3+ services : {kind=server} | count() > 2,2+ services : {kind=server} | count() > 1,Everything (noisy) : {}", + "query": "LibreChat transactions : {trace:rootService=\"librechat\"} && {resource.service.name!=\"librechat\"},Reaching a Kong gateway : {trace:rootService=\"librechat\"} && {name=~\"kong\\\\..*\"},All LibreChat traces (incl. /metrics scrapes) : {trace:rootService=\"librechat\"},Everything (very noisy) : {}", "options": [ { - "text": "Transactions — 3+ services", - "value": "{kind=server} | count() > 2", + "text": "LibreChat transactions", + "value": "{trace:rootService=\"librechat\"} && {resource.service.name!=\"librechat\"}", "selected": true }, { - "text": "2+ services", - "value": "{kind=server} | count() > 1", + "text": "Reaching a Kong gateway", + "value": "{trace:rootService=\"librechat\"} && {name=~\"kong\\\\..*\"}", "selected": false }, { - "text": "Everything (noisy)", + "text": "All LibreChat traces (incl. /metrics scrapes)", + "value": "{trace:rootService=\"librechat\"}", + "selected": false + }, + { + "text": "Everything (very noisy)", "value": "{}", "selected": false } ], "current": { - "text": "Transactions — 3+ services", - "value": "{kind=server} | count() > 2" + "text": "LibreChat transactions", + "value": "{trace:rootService=\"librechat\"} && {resource.service.name!=\"librechat\"}" }, "includeAll": false, "multi": false, - "description": "Which traces are worth listing." + "description": "Traces started BY LibreChat and leaving it. Rooting on LibreChat is what makes this a user-facing transaction rather than infrastructure chatter; requiring a second service is what drops Prometheus scraping LibreChat's own /metrics, which otherwise fills the list." }, { "name": "traceId", @@ -89,7 +94,7 @@ { "type": "table", "title": "Transactions", - "description": "Traces where at least three services received an HTTP request — a real end-to-end flow rather than a token call or a health probe. Filtering by service name does not achieve this: Keycloak and the gateways are services too.\n\nClick a Trace ID to load it below.", + "description": "Traces LibreChat started that reached another service — the user-facing transactions.\n\nCounting spans was the previous approach and it let LibreChat's own /metrics scrapes through: with 50 of them in six hours they crowded out the two real conversations. Rooting on the service that starts a transaction is both simpler and stricter.\n\nThe trade: anything not entering through LibreChat is invisible here — a direct call to a gateway, or a curl against an API. Use 'Everything' for those.\n\nClick a Trace ID to load it below.", "datasource": { "type": "tempo", "uid": "tempo"