Join Slack
Communities
Powered by
It looks potentially interesting to integrate ktor...
# ktor
m
mp
10/03/2018, 11:37 PM
It looks potentially interesting to integrate ktor request metadata into Google's Stackdriver logging (
https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
). Could use a LoggingEventEnhancer (
https://github.com/googleapis/google-cloud-java/blob/fdccb0bd5c6f4887ef8a47be1901522ae243ee2b/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/src/main/java/com/google/cloud/logging/logback/LoggingEventEnhancer.java
) in the existing Logback/Stackdriver integration to populate more interesting data in the resulting LogEntry (
https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
), like the authenticated principal (if any) or the http stuff as in
https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#HttpRequest
. - Thoughts on how best to wedge things like the request url, or authenticated principal, into coroutine context so I could dig it out later when decorating log events? - Is there a way from an implementation of LoggingEventEnhancer to reach into the coroutine context, given that it's plain Java and knows nothing of suspending functions?
4
Views
Open in Slack
Previous
Next