mia-platform/custom-plugin-lib

Should forward the request id in internal calls

davidebianchi opened this issue · 2 comments

The feature you are proposing

In service calls, we should automatically forward the platform headers (like x-request-id).

A snippet of code for replicating the issue or showing the proposal usage if applicable

I suggest two possible way to handle this:

  1. add an internal proxy function
  2. add an option to declare if default platform headers should be passed or not.

All this solutions, concat platform headers with headers set in ADDITIONAL_HEADERS_TO_PROXY env var

There is the isMiaHeaderInjected header, set by default to true, to inject mia headers to the request.
In the mia headers it is not present the request id, used by logger to follow the request flow. It could be useful to add also this header (set dynamically, header key could change).

This is now possible with the new http client and it will be released soon. I close the issue, since the other proxies are now deprecated.