-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
RFC: RPCEndpoint standardization #6363
Conversation
from snuba.web.rpc import RPCEndpoint | ||
|
||
|
||
class MyRPC(RPCEndpoint[Timestamp, Timestamp]): |
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.
add a comment or something? unclear what this is for
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.
this is to test that the registration works?
@@ -5,17 +5,17 @@ | |||
import pytest | |||
from google.protobuf.timestamp_pb2 import Timestamp | |||
from sentry_protos.snuba.v1alpha.endpoint_tags_list_pb2 import ( | |||
TraceItemAttributesRequest, | |||
TraceItemAttributesRequest as TraceItemAttributesRequestProto, |
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.
is annoying to have to do default imports like this, can we just make sentry-protos name things blahproto by default?
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
@@ -273,14 +273,11 @@ def unqualified_query_view(*, timer: Timer) -> Union[Response, str, WerkzeugResp | |||
|
|||
|
|||
@application.route("/rpc/<name>/<version>", methods=["POST"]) | |||
@util.time_request("rpc") |
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.
Why did you remove this?
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.
not necessary, the RPC builds in a timer by default
Context
This project will need observability, monitoring and other production readiness facets. This PR creates a wrapper around our RPC functionality to allow:
Desired feedback