Skip to content

Fix broken kibana visual links

Gregorius Marco requested to merge mg-fix-kibana-visual-link into master

When clicking these links in the SLI rows, the chart is erroring out.

image.png

This MR fixes the below JS error when loading the Kibana tooling link for visual charts, example of broken link: https://log.gprd.gitlab.net/app/kibana#/visualize/create?type=line&indexPattern=AWNABDRwNDuQHTm2tH6l&\_a=(filters:!((meta:(key:json.type.keyword,params:sidekiq,type:phrase),query:(match:(json.type.keyword:(query:sidekiq,type:phrase)))),(meta:(key:json.stage,params:'main',type:phrase),query:(match:(json.stage:(query:'main',type:phrase)))),(meta:(key:json.type,params:sidekiq,type:phrase),query:(match:(json.type:(query:sidekiq,type:phrase))))),query:(language:kuery,query:''),vis:(aggs:!((enabled:!t,id:'1',params:(field:json.duration_s,percents:!(95)),schema:metric,type:percentiles),(enabled:!t,id:'2',params:(drop_partials:!t,extended_bounds:(),field:json.time,interval:auto,min_doc_count:1,scaleMetricValues:!f,timeRange:(from:'2023-07-26T02:33:00.000Z',to:'2023-07-26T08:33:59.999Z'),useNormalizedEsInterval:!t),schema:segment,type:date_histogram)),params:(valueAxes:!((id:'ValueAxis-1',name:'LeftAxis-1',position:left,scale:(mode:normal,type:linear),show:!t,style:(),title:(text:'p95+Request+Duration:+json.duration_s'),type:value)))))&\_g=(time:(from:'2023-07-26T02:33:00.000Z',to:'2023-07-26T08:33:59.999Z'))

image.png

Fixed link: https://log.gprd.gitlab.net/app/kibana#/visualize/create?type=line&indexPattern=AWNABDRwNDuQHTm2tH6l&\_a=(filters:!((meta:(key:json.type.keyword,params:sidekiq,type:phrase),query:(match:(json.type.keyword:(query:sidekiq,type:phrase)))),(meta:(key:json.stage,params:'main',type:phrase),query:(match:(json.stage:(query:'main',type:phrase)))),(meta:(key:json.type,params:sidekiq,type:phrase),query:(match:(json.type:(query:sidekiq,type:phrase))))),query:(language:kuery,query:''),vis:(aggs:!((enabled:!t,id:'1',params:(field:json.duration_s,percents:!(95)),schema:metric,type:percentiles),(enabled:!t,id:'2',params:(drop_partials:!t,extended_bounds:(),field:json.time,interval:auto,min_doc_count:1,scaleMetricValues:!f,timeRange:(from:'2023-07-26T06:03:00.000Z',to:'2023-07-26T12:03:59.999Z'),useNormalizedEsInterval:!t),schema:segment,type:date_histogram)),params:(valueAxes:!((id:'ValueAxis-1',labels:(filter:!t,rotate:0,show:!t,truncate:100),name:'LeftAxis-1',position:left,scale:(mode:normal,type:linear),show:!t,style:(),title:(text:'p95+Request+Duration:+json.duration_s'),type:value)))))&\_g=(time:(from:'2023-07-26T06:03:00.000Z',to:'2023-07-26T12:03:59.999Z'))

The fix was found through brute force comparison from the broken link with a hand-build chart.

Edited by Gregorius Marco

Merge request reports