Merge pull request #75 from SigNoz/fix-bug-link-err-traces

Fixes bugs on Tracing and Metrics
This commit is contained in:
Ankit Nayan 2021-05-02 20:52:24 +05:30 committed by GitHub
commit e00b4a503e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 8 deletions

View File

@ -75,7 +75,7 @@ const columns = [
key: "errorRate",
sorter: (a: any, b: any) => a.errorRate - b.errorRate,
// sortDirections: ['descend', 'ascend'],
render: (value: number) => (value * 100).toFixed(2),
render: (value: number) => (value).toFixed(2),
},
{
title: "Requests Per Second",

View File

@ -62,6 +62,10 @@ const _TraceFilter = (props: TraceFilterProps) => {
setServiceList(response.data);
})
.then(() => {
/*
Todo
revisit this flow post refactoring store
*/
const operationName = urlParams.get(METRICS_PAGE_QUERY_PARAM.operation);
const serviceName = urlParams.get(METRICS_PAGE_QUERY_PARAM.service);
const errorTag = urlParams.get(METRICS_PAGE_QUERY_PARAM.error);
@ -72,6 +76,18 @@ const _TraceFilter = (props: TraceFilterProps) => {
service: serviceName,
});
populateData(serviceName);
} else if (serviceName && errorTag) {
props.updateTraceFilters({
...props.traceFilters,
service: serviceName,
tags: [
{
key: METRICS_PAGE_QUERY_PARAM.error,
value: errorTag,
operator: "equals",
},
],
});
} else {
if (operationName) {
handleChangeOperation(operationName);
@ -79,13 +95,13 @@ const _TraceFilter = (props: TraceFilterProps) => {
if (serviceName) {
handleChangeService(serviceName);
}
}
if (errorTag) {
onTagFormSubmit({
tag_key: METRICS_PAGE_QUERY_PARAM.error,
tag_value: errorTag,
operator: "EQUAL",
});
if (errorTag) {
onTagFormSubmit({
tag_key: METRICS_PAGE_QUERY_PARAM.error,
tag_value: errorTag,
operator: "equals",
});
}
}
});
}, []);