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

Nexus interceptors #1841

Merged
merged 5 commits into from
Feb 22, 2025
Merged

Nexus interceptors #1841

merged 5 commits into from
Feb 22, 2025

Conversation

bergundy
Copy link
Member

@bergundy bergundy commented Feb 21, 2025

What was changed

Added support for Nexus operation inbound and outbound interceptors. The implementation was a bit awkward and required a couple of adapters from and to the Nexus SDK middleware interfaces but that seems reasonable if we want to leverage shared code from that SDK.

Why?

Support tracing and other use cases.

Checklist

  • Upgrade to a stable Nexus SDK
  • Figure out if we want to also intercept logs and metrics emitted by the SDK outside of the "handler" scope - won't do
  • Add tracing interceptor support - will do in a followup PR

//
// All implementations must embed [NexusOperationInboundInterceptorBase] to safely handle future changes.
//
// Note: Experimental
Copy link
Member Author

Choose a reason for hiding this comment

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

I marked interceptors as experimental at this stage. Ideally we would have at least one release to let this bake. I don't think this is a blocker for GA.

@bergundy bergundy marked this pull request as ready for review February 21, 2025 21:44
@bergundy bergundy requested a review from a team as a code owner February 21, 2025 21:44
@bergundy bergundy enabled auto-merge (squash) February 21, 2025 21:48
@bergundy bergundy merged commit d32c252 into temporalio:master Feb 22, 2025
13 checks passed
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.

2 participants