Skip to content

Conversation

@k-fish
Copy link
Member

@k-fish k-fish commented Apr 29, 2024

Summary

This allows multiple span conditions to be used together to target specific traces containing all (up to 3) of those conditions.

Screenshots

Screenshot 2024-04-29 at 5 21 36 PM

This allows multiple span conditions to be used together to target specific traces containing all (up to 3) of those conditions.
@k-fish k-fish self-assigned this Apr 29, 2024
@k-fish k-fish requested a review from a team April 29, 2024 21:21
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 29, 2024
@k-fish k-fish enabled auto-merge (squash) April 29, 2024 21:22
// TODO: load tags for autocompletion
const organization = useOrganization();
const canAddMoreQueries = queries.length <= 2;
const localQueries = queries.length ? queries : [''];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesnt stop the user from editing the query string and injecting more queries right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, basically if it's empty we pretend to have an array, otherwise we use the provided array


export function TracesSearchBar({query, handleSearch}: TracesSearchBarProps) {
const getSpanName = (index: number) => {
const spanNames = [t('Span A'), t('Span B'), t('Span C')];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: move this into a constant outside the function

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case the translate function would run during import, which isn't a good tradeoff. Hiding consts in helpers is fine.

@k-fish k-fish merged commit 001c56e into master Apr 29, 2024
@k-fish k-fish deleted the ref/traces-mult-queries-ux-2 branch April 29, 2024 21:33
@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants