You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It would allow us to implement an interceptor that logs the usage of deprecated endpoints.
Describe the solution you'd like
RPC specs provide a deprecated option that could be used on a method. Currently, Connect only added a deprecated comment. Exposing the value to interceptors could help to build more robust solutions.
A more generic approach is to expose all the options in connect.Spec somehow (map?). In this case, we could add a custom option with a api removal date and set some alerts for it.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered:
Hey @makasim! Great suggestion - I've been meaning to expose the RPC's descriptor on Spec, which would give you access to deprecated, any custom options, and a bunch of other info.
In the meantime, you can get the descriptor yourself from the global registry: see this comment on another issue. protoc-gen-connect-go now generates constants for service names, so you shouldn't need a hard-coded string to look up the descriptor.
Is your feature request related to a problem? Please describe.
It would allow us to implement an interceptor that logs the usage of deprecated endpoints.
Describe the solution you'd like
RPC specs provide a
deprecated
option that could be used on a method. Currently, Connect only added a deprecated comment. Exposing the value to interceptors could help to build more robust solutions.The solution I see: The option could be added to
connect.Spec
. That would be enough for this particular case.A more generic approach is to expose all the options in
connect.Spec
somehow (map?). In this case, we could add a custom option with a api removal date and set some alerts for it.Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: