-
Notifications
You must be signed in to change notification settings - Fork 261
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
Bug fix: Secondary Logformat entries are not shown when the access log format is json #3501
Conversation
@@ -78,6 +78,13 @@ func getFileAccessLogConfigs() *config_access_logv3.AccessLog { | |||
for k, v := range logConf.AccessLogs.JSONFormat { | |||
logFields[k] = &structpb.Value{Kind: &structpb.Value_StringValue{StringValue: v}} | |||
} | |||
formattedSecondaryLogFormat := strings.ReplaceAll(logConf.AccessLogs.SecondaryLogFormat, "'", "") |
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.
Shall we do the other way around?
Let's remove SecondaryLogFormat
and read it from a new config JSONFormatSecondary
. We can use the value of the map for Text format if needed.
secondaryLogFields := strings.Split(formattedSecondaryLogFormat, " ") | ||
// iterate through secondary log fields and update the logfields map | ||
for _, field := range secondaryLogFields { | ||
logFields[strings.ReplaceAll(strings.TrimSpace(field), "%", "")] = |
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.
Do we need to use TrimSpace
again ?
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.
ah nope
will fix
[succeeded] : dev-deployment-v2 : 20240326.5 |
[succeeded] Controlplane cluster : dev-deployment-v2 : 20240326.5 |
[succeeded] Dataplane(EastUS) cluster : dev-deployment-v2 : 20240326.5 |
[succeeded] Dataplane(NorthEU) cluster : dev-deployment-v2 : 20240326.5 |
[succeeded] Dataplane(NorthEU) cluster : stage-deployment-v2 : 20240327.2 |
[succeeded] Dataplane(CDP2-WU2) cluster : stage-deployment-v2 : 20240327.2 |
[succeeded] Controlplane cluster : stage-deployment-v2 : 20240327.2 |
[succeeded] Dataplane(EastUS) cluster : stage-deployment-v2 : 20240327.2 |
[failed] Controlplane cluster : prod-deployment-v2 : 20240328.5 |
[succeeded] Dataplane(CDP2-WU2) cluster : prod-deployment-v2 : 20240328.5 |
[succeeded] Dataplane(NorthEU) cluster : prod-deployment-v2 : 20240328.5 |
[succeeded] Dataplane(EastUS) cluster : prod-deployment-v2 : 20240328.5 |
[] Dataplane(EastUS) cluster : prod-deployment-v2 : 20240328.5 |
[] Controlplane cluster : prod-deployment-v2 : 20240328.5 |
[] Dataplane(CDP2-WU2) cluster : prod-deployment-v2 : 20240328.5 |
[] Dataplane(NorthEU) cluster : prod-deployment-v2 : 20240328.5 |
Purpose
Issues
Fixes #
Automation tests
Tested environments
Locally tested
Maintainers: Check before merge