Skip to content

Conversation

@Quinn-With-Two-Ns
Copy link
Contributor

Add interceptor to propagate headers to Nexus operations

@Quinn-With-Two-Ns Quinn-With-Two-Ns marked this pull request as ready for review February 28, 2025 23:06
@mjameswh
Copy link

Why do you need this nexus-specific context propagation as a user-land feature? I mean, shouldn't that be part of a more general "context propagation" sample? And doesn't the SDK already provide context propagation interceptors?

This is not blocking, but you may want to clarify the use case for this vs apparent alternatives in the sample's README file.

@mjameswh
Copy link

Also:

  • Don't you need to also add this sample to the repository's root README file and/or other list of samples?
  • Copyright notices seem off. Absolutely no mention of Temporal?

@Quinn-With-Two-Ns
Copy link
Contributor Author

I mean, shouldn't that be part of a more general "context propagation" sample?

Nexus context propagation is different from our other "context propagation" samples since Nexus headers are different then normal Temporal header (map[string]string vs map[string]payload).

And doesn't the SDK already provide context propagation interceptors?

No, at least not as an interceptor. Java has a concept of a ContextPropagator that was added before we had interceptors, but the SDK provides no built in implementation and it is very limited. Only propagates context on workflow and activity start. We want to replace it with a context propagation interceptor but it hasn't been prioritized.

@Quinn-With-Two-Ns
Copy link
Contributor Author

Don't you need to also add this sample to the repository's root README file and/or other list of samples?

Yes I need to , good catch

@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit d6629ab into temporalio:main Mar 14, 2025
5 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