Open sergio-margale opened 2 years ago
Adding tags to Response
would be tricky, but maybe we can extend RequestMetadata
with tags so that Response.request
would make it possible to read that. Maybe you'd like to attempt creating a PR?
Tbh, I'm not sure if I can do it anytime soon
I found 5 mins to at least do the first step :) https://github.com/softwaremill/sttp-model/pull/189
In order to differentiate sttp prometheus metrics by external service I used to tag the request with the name of the external service, so then when creating the
PrometheusBackend
I could get the tag from the request and add it to the metric as a label.Since 3.5.0 that's no longer possible for all metrics, as now
responseToSuccessCounterMapper
andresponseToErrorCounterMapper
are based on the Response.Is there any plan to maybe add
tags
to theResponseMetadata
? Or is there maybe another way to achieve this?