-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
log payloads, and add grpc duration as an integer #1615
Conversation
3f5d200
to
844e0a9
Compare
pkg/cmd/serve.go
Outdated
@@ -47,6 +47,10 @@ func RegisterServeFlags(cmd *cobra.Command, config *server.Config) error { | |||
config.DispatchClusterMetricsEnabled = true | |||
config.DispatchClientMetricsEnabled = true | |||
|
|||
// Flags for logging | |||
cmd.Flags().BoolVar(&config.EnableRequestLogs, "enable-request-logs", false, "logs API request payloads") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flags need to be named with a prefix for the subsystem they control, so that they are grouped together.
We should prefix this with grpc
or log
; probably log.
Any existing flags that start with enable
were mistakes and should probably have their flags hidden and new ones introduced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grpc-request-logs-enabled
grpc-repsonse-logs-enabled
01fe548
to
9f89899
Compare
9f89899
to
e5eb8f3
Compare
in order to better troubleshoot certain situations, it would be useful to load request and response payloads. Also in certain log aggregators it's not possible to convert duration fields that are represented as a string, and this is useful in order to filter requests by a specific duration threshold. This commit changes the duration function to log it as an integer
e5eb8f3
to
1b8fa4c
Compare
in order to better troubleshoot certain situations, it would be useful to load request and response payloads.
Also in certain log aggregators it's not possible to convert duration fields that are represented as a string, and this is useful in order to filter requests by a specific duration threshold. This commit changes the duration function to log it as an integer
Adds options to control request and response payloads via CLI