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

Pass X-Vcap-Request-Id header in calls to BBS #3305

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

mariash
Copy link
Member

@mariash mariash commented May 31, 2023

  • A short explanation of the proposed change:

To support distributed tracing request id received from the Gorouter is passed to Diego BBS so that the same request can be traced along multiple components.

  • An explanation of the use cases your change solves

This is part of distributed tracing feature - the ability to trace the same request across multiple components, e.g. stopping an app instance first will come to Gorouter, which will generate request ID and pass it down to Cloud Controller, which will pass it to Diego BBS, which will pass it to downstream components like Auctioneer, Rep and Garden.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

To support distributed tracing the request id received from the Gorouter
is passed to Diego BBS so that the same request can be traced along
multiple components.

Signed-off-by: Maria Shaldybin <[email protected]>
@sethboyles
Copy link
Member

We were curious why there was an extra uuid appended to the original vcap request id, and it seems like it was carrying over behavior explained in this comment?

# we append a new guid to the request because we have no idea if the
# caller is really going to be giving us a unique guid, i.e. they might
# generate the guid and then turn around and make 3 api calls using it.
if @request_guid
@request_guid = "#{@request_guid}::#{SecureRandom.uuid}"
else
@request_guid ||= SecureRandom.uuid
end

@sethboyles sethboyles merged commit 820671d into cloudfoundry:main Jun 8, 2023
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.

4 participants