js-sdk icon indicating copy to clipboard operation
js-sdk copied to clipboard

Helper methods to propagate trace headers

Open danielgerlag opened this issue 2 years ago • 3 comments

Add helper methods to propagate trace headers from an incoming invoke request or pub sub message to an outgoing invocation or pub sub message.

danielgerlag avatar Jan 05 '23 00:01 danielgerlag

In order to make my scenario work, I had to create an alternative implementation of the pubsub client that allows the trace headers to be set.

danielgerlag avatar Jan 07 '23 01:01 danielgerlag

Hi @danielgerlag ! Thank you for opening a ticket, seeing that you created an alternative implementation, would you have some time to share what you did? Maybe through a PR?

XavierGeerinck avatar Jan 07 '23 08:01 XavierGeerinck

Would this be as easy as having an optional headers parameter for all the clients? That could then be passed to the base class execute method. There is already code in HTTPClient.ts to read the headers if they are provided.

DarqueWarrior avatar Jan 26 '23 17:01 DarqueWarrior