RKemper added a comment.

  With respect to recording nginx request responses:
  
  **Getting direct logs**: One idea is to add `/var/log/nginx/access.log` to 
`RollingFileAppender` in `modules/query_service/templates/logback.xml.erb` 
(https://github.com/wikimedia/puppet/blob/6e3c52f30166f88c5021c11ebd5f6aa411118854/modules/query_service/templates/logback.xml.erb#L29)
  
    Example log line:
    ```
    (REDACTED IP; EXAMPLE FORMAT xx.xx.x.xx) - - [13/Oct/2022:16:28:14 +0000] 
"GET /sparql?format=json&query=REDACTED_QUERY_STRING HTTP/1.1" 200 97 "-" 
"REDACTED_USER_AGENT"
    ```
    
    Pros: We're ingesting the full log line, not just prometheus metrics. This 
would make it easier to correlate, say, a spike in 5xx responses, with the log 
lines corresponding to the actual requests
    
    Cons: We don't directly get time-series metrics for this. We'd probably 
want to separately ingest corresponding time series metrics so we can actually 
see this in Grafana. Kibana has the ability to visualize by parsing log lines, 
but this is computationally expensive, so we probably want to directly export 
nginx request metrics to Prometheus.
  
  **Getting metrics**: I'm a bit hazy on the best way to do this. There's 
hopefully a pretty straightforward way. I'll see if o11y has any thoughts on 
this.

TASK DETAIL
  https://phabricator.wikimedia.org/T313751

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: RKemper
Cc: MPhamWMF, Aklapper, Astuthiodit_1, AWesterinen, karapayneWMDE, Invadibot, 
maantietaja, CBogen, ItamarWMDE, Akuckartz, Nandana, Namenlos314, Lahi, Gq86, 
Lucas_Werkmeister_WMDE, GoranSMilovanovic, QZanden, EBjune, merbst, 
LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Xmlizer, jkroll, 
Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to