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

Is it possible to Log downstream calls made by the application #448

Closed
SaiVishwas opened this issue Mar 1, 2019 · 4 comments
Closed

Is it possible to Log downstream calls made by the application #448

SaiVishwas opened this issue Mar 1, 2019 · 4 comments

Comments

@SaiVishwas
Copy link

We have a SpringBoot application which makes downstream calls to external services, would be possible to log these external calls as well?

Detailed Description

We would like to log the downstream calls made to the external services. And later use those to mock the downstream calls. Would it be possible to achieve this using Logbook?

Context

It would greatly help in running tests quickly, if the ability to mock downstream services is available.

Possible Implementation

Your Environment

  • Version used:
  • Link to your project:
@whiskeysierra
Copy link
Collaborator

Yes, that's already built-in, but it depends on your client technology. What do you use to make requests? RestTemplate? Which HTTP library do you use under the hood?

@whiskeysierra
Copy link
Collaborator

Logbook has support for several client technologies:

@SaiVishwas
Copy link
Author

Hi, thanks a lot for your quick response.

I have two more queries :

  1. Is it to also possible to mock the downstream calls (similar to how WireMock works)
  2. Could you please provide any metrics related to the latency/performance degradation introduced by logbook

Thank you.

@whiskeysierra
Copy link
Collaborator

  1. Is it to also possible to mock the downstream calls (similar to how WireMock works)

This is not related to Logbook anymore. Why not just use WireMock? https://github.com/rest-driver/rest-driver would also work.

2. Could you please provide any metrics related to the latency/performance degradation introduced by logbook

There is pending issue #99 to do this. One bottleneck was already identified, see #425. The next 2.x release should give you a lot more control to not buffer the request/response body in the first place. But it's not there yet and even then we still don't have any hard numbers. We use it at Zalando and the penalty is not noticeable or at least not significant enough.

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

No branches or pull requests

2 participants