-
-
Notifications
You must be signed in to change notification settings - Fork 62
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-rpc): Add an uptime check resolver #6805
base: master
Are you sure you want to change the base?
Conversation
snuba/datasets/configuration/events_analytics_platform/entities/uptime_checks.yaml
Outdated
Show resolved
Hide resolved
snuba/datasets/configuration/events_analytics_platform/entities/uptime_checks.yaml
Outdated
Show resolved
Hide resolved
) | ||
|
||
|
||
def _convert_result_timeseries( |
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 think this function we could definitely move to the higher level common module
# buckets time by granularity according to the start time of the request. | ||
# time_slot = start_time + (((timestamp - start_time) // granularity) * granularity) | ||
# Example: | ||
# start_time = 1001 | ||
# end_time = 1901 | ||
# granularity = 300 | ||
# timestamps = [1201, 1002, 1302, 1400, 1700] | ||
# buckets = [1001, 1301, 1601] # end time not included because it would be filtered out by the request | ||
SelectedExpression( | ||
name="time", | ||
expression=f.toDateTime( | ||
f.plus( | ||
request.meta.start_timestamp.seconds, | ||
f.multiply( | ||
f.intDiv( | ||
f.minus( | ||
f.toUnixTimestamp(column("timestamp")), | ||
request.meta.start_timestamp.seconds, | ||
), | ||
request.granularity_secs, | ||
), | ||
request.granularity_secs, | ||
), | ||
), | ||
alias="time_slot", | ||
), | ||
), |
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.
because you have this you don't need the time series processor
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.
also a good candidate for a common module
snuba/web/rpc/v1/resolvers/R_uptime_checks/resolver_trace_item_table.py
Outdated
Show resolved
Hide resolved
snuba/web/rpc/v1/resolvers/R_uptime_checks/resolver_trace_item_table.py
Outdated
Show resolved
Hide resolved
|
||
@pytest.mark.clickhouse_db | ||
@pytest.mark.redis_db | ||
class TestTraceItemTable(BaseApiTest): |
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.
write a timeseries test as well?
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
This will add a resolver to support the uptime check item type.