-
-
Notifications
You must be signed in to change notification settings - Fork 64
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(autocomplete): Implement key autocomplete for eap items #6978
Conversation
…_autocomplete_impl
…/snuba into volo/eap/key_autocomplete_impl
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, added a couple of nits.
map_elems = [] | ||
for key, val in ATTRIBUTE_MAPPINGS.items(): | ||
map_elems.append(key) | ||
map_elems.append(val) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these map_elems
intended to be used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
@@ -300,7 +338,18 @@ def t(row: Row) -> TraceItemAttributeNamesResponse.Attribute: | |||
name=attr_name, type=getattr(AttributeKey.Type, attr_type) | |||
) | |||
|
|||
return list(map(t, query_res.result.get("data", []))) | |||
data = query_res.result.get("data", []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: If "data"
is not present in query_res.result
, then we get an empty list, which is further extended but not persisted back to the result
. Should it be persisted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, the query_res
variable is not used for anything after this function. Also, the data
key in practice is always present
@@ -166,6 +166,12 @@ def _execute( | |||
self, in_msg: TraceItemAttributeValuesRequest | |||
) -> TraceItemAttributeValuesResponse: | |||
in_msg.limit = in_msg.limit or 1000 | |||
# HACK (Volo): for backwards compatibility. eap_spans used to store this value, | |||
# eap_items does not | |||
if in_msg.key == "sentry.service": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think sentry.service is used anywhere on the sentry side, probably safe to remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is, I checked with folks this morning
Requires #6970 to be merged
Requires getsentry/sentry#87511 to be merged
Resolves https://github.com/getsentry/eap-planning/issues/204
Implements the key autocomplete without the intersecting attributes filter, no longer supports attribute pagination:
See summarized decision here:
https://www.notion.so/sentry/Deprecating-pagination-in-autocomplete-APIs-1b98b10e4b5d80ab832ff700d49f15c3