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
Signed-off-by: Ed Snible <snible@us.ibm.com>
  • Loading branch information
esnible committed May 13, 2022
1 parent 89a6eb1 commit 19a28bd
Show file tree
Hide file tree
Showing 2 changed files with 4 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,7 @@ 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 +169,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 19a28bd

Please sign in to comment.