Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Can I get the request and response body for each request made? #31

Open
ansjin opened this issue Jun 6, 2018 · 2 comments
Open

Can I get the request and response body for each request made? #31

ansjin opened this issue Jun 6, 2018 · 2 comments

Comments

@ansjin
Copy link

ansjin commented Jun 6, 2018

Is there a way by which somehow i can get the request and response body for each request received and served by a service ?

@Eli-Goldberg
Copy link
Contributor

@ansjin
What do you mean by "get the request body"? Do you mean before the appmetrics intervention?

If you mean after the intevention - depending on your framework (Koa for example), you could use something like the following
example.

If you mean before the appmetrics interventino -
you could basically fork appmetrics, and provide a callback to appmetrics to be used on each incoming / outgoing hook.
In this case, maybe appmetrics could also provide an "onBefore" style event.

@sjanuary wdyt?

@sjanuary
Copy link
Member

@ansjin we don't currently collect this data in appmetrics-zipkin, or in appmetrics which is a more general monitoring tool. Do you want to add it to the Zipkin trace as metadata? I think that could be done although it's not something we have any plans to add to the tool so you would need to modify it yourself. https://github.com/RuntimeTools/appmetrics-zipkin/blob/master/probes/http-probe-zipkin.js#L98-L109 might be a good place to start.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants