Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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',
rubenvp8510 marked this conversation as resolved.
Show resolved Hide resolved
}))}
onValueClick={t => {
goToTrace(t.traceID);
Expand Down