Fix logfile url rendering
Why is this change being made?
Currently the service maturity model is not rendering certain <a href>
tags properly. See https://about.gitlab.com/handbook/engineering/infrastructure/service-maturity-model/#api-detail
This MR runs html_escape
to clean the url inputs specifically double quotes.
Before: https://log.gprd.gitlab.net/app/kibana#/discover?_a=(columns:!(json.meta.caller_id,json.operation_name,json.meta.feature_category,json.operation_fingerprint,json.duration_s),filters:!((meta:(key:json.subcomponent,params:graphql_json,type:phrase),query:(match:(json.subcomponent:(query:graphql_json,type:phrase)))),(meta:(key:exists,type:json.target_duration_s,value:exists),query:(exists:(field:json.target_duration_s))),(meta:(key:exists,type:json.duration_s,value:exists),query:(exists:(field:json.duration_s))),!((meta:(key:query,type:custom,value:'{"bool":+{"minimum_should_match":+1,+"should":+[{"script":+{"script":+{"source":+"doc[!'json.duration_s!'].value+>+doc[!'json.target_duration_s!'].value"}}}]}}'),query:(bool:(minimum_should_match:1,should:!((script:(script:(source:'doc[!'json.duration_s!'].value+>+doc[!'json.target_duration_s!'].value'))))))))),index:'7092c4e2-4eb5-46f2-8305-a7da2edad090',sort:!(!(json.duration_s,desc)))&_g=(time:(from:'${__from:date:iso}',to:'${__to:date:iso}'))
After: https://log.gprd.gitlab.net/app/kibana#/discover?_a=(columns:!(json.meta.caller_id,json.operation_name,json.meta.feature_category,json.operation_fingerprint,json.duration_s),filters:!((meta:(key:json.subcomponent,params:graphql_json,type:phrase),query:(match:(json.subcomponent:(query:graphql_json,type:phrase)))),(meta:(key:exists,type:json.target_duration_s,value:exists),query:(exists:(field:json.target_duration_s))),(meta:(key:exists,type:json.duration_s,value:exists),query:(exists:(field:json.duration_s))),!((meta:(key:query,type:custom,value:'{%22bool%22:+{%22minimum_should_match%22:+1,+%22should%22:+[{%22script%22:+{%22script%22:+{%22source%22:+%22doc[!'json.duration_s!'].value+%3E+doc[!'json.target_duration_s!'].value%22}}}]}}'),query:(bool:(minimum_should_match:1,should:!((script:(script:(source:'doc[!'json.duration_s!'].value+%3E+doc[!'json.target_duration_s!'].value'))))))))),index:'7092c4e2-4eb5-46f2-8305-a7da2edad090',sort:!(!(json.duration_s,desc)))&_g=(time:(from:'${__from:date:iso}',to:'${__to:date:iso}'))
Author Checklist
-
Provided a concise title for this Merge Request (MR) -
Added a description to this MR explaining the reasons for the proposed change, per say why, not just what - Copy/paste the Slack conversation to document it for later, or upload screenshots. Verify that no confidential data is added, and the content is SAFE
-
Assign reviewers for this MR to the correct Directly Responsible Individual/s (DRI) - If the DRI for the page/s being updated isn’t immediately clear, then assign it to one of the people listed in the
Maintained by
section on the page being edited - If your manager does not have merge rights, please ask someone to merge it AFTER it has been approved by your manager in #mr-buddies
- The when to get approval handbook section explains the workflow in more detail
- If the DRI for the page/s being updated isn’t immediately clear, then assign it to one of the people listed in the
-
If the changes affect team members, or warrant an announcement in another way, please consider posting an update in #whats-happening-at-gitlab linking to this MR - If this is a change that directly impacts the majority of global team members, it should be a candidate for #company-fyi. Please work with internal communications and check the handbook for examples.