Skip to content

Commit

Permalink
Use red on scatterplot for traces if any spans have an error=true tag (
Browse files Browse the repository at this point in the history
…jaegertracing#951)

* Use red on scatterplot for traces if any spans have an error=true tag

Signed-off-by: Ed Snible <snible@us.ibm.com>

* Used 'yarn prettier' to appease 'yarn lint'

Signed-off-by: Ed Snible <snible@us.ibm.com>
Signed-off-by: VladislavBryukhanov <gfedcba625@gmail.com>
  • Loading branch information
esnible authored and VladislavBryukhanov committed May 26, 2022
1 parent 7add8cd commit 77f85c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function ScatterPlotImpl(props) {
left: 50,
}}
width={containerWidth}
colorType="literal"
height={200}
>
<XAxis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import reduxFormFieldAdapter from '../../../utils/redux-form-field-adapter';

import type { FetchedTrace } from '../../../types';
import type { SearchQuery } from '../../../types/search';
import type { KeyValuePair } from '../../../types/trace';

import './index.css';

Expand Down Expand Up @@ -155,6 +156,8 @@ export class UnconnectedSearchResults extends React.PureComponent<SearchResultsP
}
const cohortIds = new Set(diffCohort.map(datum => datum.id));
const searchUrl = queryOfResults ? getUrl(stripEmbeddedState(queryOfResults)) : getUrl();
const isErrorTag = ({ key, value }: KeyValuePair) =>
key === 'error' && (value === true || value === 'true');
return (
<div className="SearchResults">
<div className="SearchResults--header">
Expand All @@ -167,6 +170,7 @@ export class UnconnectedSearchResults extends React.PureComponent<SearchResultsP
traceID: t.traceID,
size: t.spans.length,
name: t.traceName,
color: t.spans.some(sp => sp.tags.some(isErrorTag)) ? 'red' : '#12939A',
}))}
onValueClick={t => {
goToTrace(t.traceID);
Expand Down

0 comments on commit 77f85c3

Please sign in to comment.