Generate request-id for api call - #711
Conversation
🦋 Changeset detectedLatest commit: 9df0eb5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| 'User-Agent': USER_AGENT, | ||
| ...headers, | ||
| }; | ||
| if (!hasHeader(requestHeaders, REQUEST_ID_HEADER)) { |
There was a problem hiding this comment.
looks like you're guarding against the possibility of the request id header being set already on the request?
I'm wondering why we're not always setting the header as part of the request headers
There was a problem hiding this comment.
The initial idea was to allow users to provide a request-id, enabling them to identify the same request when performing retries in the application.
There was a problem hiding this comment.
I see, it doesn't exclusively relate to failover attempts then anymore. As a user I could also supply the same id to different requests, which would make things potentially awkward. I guess we would treat that as a user error.
There was a problem hiding this comment.
I'm not sure if it is useful to the user.. Do you think it could cause more trouble than convenience?
The request-id change has not been released yet, so we can change the interface before that.
There was a problem hiding this comment.
Perhaps we can hold off on providing that option for now and add it later if users need it or if we see a necessity. It is always better to add an interface than to remove one from production. wdyt?
There was a problem hiding this comment.
Do you think it could cause more trouble than convenience?
yeah, potentially. If it's not something that users have requested so far, then we can start without it.
It is always better to add an interface than to remove one from production.
💯
relate to discussion livekit/node-sdks#711 (comment)
relate to livekit/server-sdk-go#954