-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
linkerd/linkerd2-proxy
#1642Description
It can be cumbersome (and expensive!) to get detailed proxy logs while the proxy is running. It would be better if we could stream logs with a custom log level from an admin endpoint, especially when gathering information for a bug report. Doing so should not alter the log level of logging emitted to stdout.
It's probably best to emit JSON-structured logs so that it's possible to inspect them programatically.
Questions:
- Should we use
POST /logs.jsonto indicate that we're creating a subscription? Or is this exposing an implementation detail? Is this effectively aGET? - How should the tracing spec be encoded? If we're POSTing a log spec, we could use a JSON object to more explicitly express the logging spec. Or we could use the
EnvFilterformat that the proxy already accepts. The latter is probably - We need to take care to ensure that writing response data does not cause more data to be logged! If, for instance, we tried to stream logs with
hyper=trace, we could get into a situation where writing the logs response causes us to log more, which requires writing more logs in the response, etc... Ideally we would make it impossible for the logging endpoint to generate logs in this case. - We'll need to think about how to authorize requests to this endpoint.
Reactions are currently unavailable