-
Notifications
You must be signed in to change notification settings - Fork 67
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
Provide solution to filter log fields by user demand #574
Conversation
@@ -65,5 +66,7 @@ | |||
"tchannel.port": 7784, | |||
"tchannel.processName": "example-gateway", | |||
"tchannel.serviceName": "example-gateway", | |||
"useDatacenter": false | |||
"tchannel.clients.requestUUIDHeaderKey": "x-request-uuid", |
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.
I wonder if we can just use the same requestUUIDHeader for tchannel and http
@@ -114,18 +115,17 @@ func GetEndpointRequestHeadersFromCtx(ctx context.Context) map[string]string { | |||
} | |||
|
|||
// withRequestUUID returns a context with request uuid. | |||
func withRequestUUID(ctx context.Context, reqUUID uuid.UUID) context.Context { | |||
func withRequestUUID(ctx context.Context, reqUUID string) context.Context { |
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.
why make this a string instead of a UUID?
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.
This is used for log field, which will be zap.String
, keeping it uuid.UUID
means useless conversion between UUID and string.
This PR does a few things: