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

feat(eap): implement backend for "what tag values exist" RPC #6304

Merged
merged 9 commits into from
Sep 17, 2024

Conversation

colin-sentry
Copy link
Member

@colin-sentry colin-sentry commented Sep 13, 2024

If you have spans with tags like "hello": "world" and "hello": "blah", you'd like to be able to say 'what values are possible for key="hello"?'

This endpoint implements that functionality.

@colin-sentry colin-sentry requested review from a team as code owners September 13, 2024 18:54
Comment on lines 59 to 64
# multiSearchAny has special treatment with ngram bloom filters
# https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#functions-support
f.multiSearchAny(
column("attr_value"),
literals_array(None, [literal(request.value_substring_match)]),
),
Copy link
Member

Choose a reason for hiding this comment

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

Not sure what happens when request.value_substring_match is empty but when that happens we should just return any result. Perhaps this condition can be optional

Copy link
Member Author

Choose a reason for hiding this comment

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

if it's empty this condition is a no-op since every string contains the empty string

Copy link
Member

@wmak wmak left a comment

Choose a reason for hiding this comment

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

lgtm

@getsentry getsentry deleted a comment from wmak Sep 17, 2024
Copy link

codecov bot commented Sep 17, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2627 1 2626 4
View the top 1 failed tests by shortest run time
tests.web.rpc.test_trace_item_values.TestTraceItemAttributes test_basic
Stack Traces | 0.312s run time
Traceback (most recent call last):
  File ".../web/rpc/test_trace_item_values.py", line 102, in test_basic
    assert response.status_code == 200
AssertionError: assert 500 == 200
 +  where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

Copy link
Member

@volokluev volokluev left a comment

Choose a reason for hiding this comment

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

approved but please rename the files

snuba/web/rpc/trace_item_values.py Outdated Show resolved Hide resolved
tests/web/rpc/test_trace_item_values.py Outdated Show resolved Hide resolved
@colin-sentry colin-sentry merged commit 29438a7 into master Sep 17, 2024
30 checks passed
@colin-sentry colin-sentry deleted the trace_item_values_endpoint branch September 17, 2024 17:57
Zylphrex added a commit to getsentry/sentry that referenced this pull request Sep 27, 2024
This uses RPC calls to fetch tag values from eap spans.

depends on getsentry/snuba#6304

---------

Co-authored-by: William Mak <william@wmak.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants