ic icon indicating copy to clipboard operation
ic copied to clipboard

feat: include metrics in the http adapter response

Open mihailjianu1 opened this issue 2 months ago • 0 comments

This PR adds the size of the downloaded response to the gRPC response coming from the HTTP outcalls adapter.

The size of the response is necessary as part of a bigger change to pricing (which now makes the distinction between the size of the downloaded response and the size of the transformed response).

Even though most of the times the size of the downloaded payload is obvious (it's almost always equal to the size of the gRPC response itself), this PR is supposed to cover cases when it's not. For instance, if the header parsing fails, the adapter would only return a tonic error, even though it still has downloaded potentially many kB.

The change needed to change the type of the adapter response by introducing a custom error type

mihailjianu1 avatar Dec 09 '25 13:12 mihailjianu1