@Override
  public Object decode(Response response, Type type)
      throws IOException, DecodeException, FeignException {
    final RequestTemplate template = response.request().requestTemplate();
    final MeteredBody body = response.body() == null ? null : new MeteredBody(response.body());

    response = response.toBuilder().body(body).build();

    final Object decoded;
    try (final Context classTimer =
        metricRegistry
            .timer(
                metricName
                    .metricName(template.methodMetadata(), template.feignTarget())
                    .tagged("uri", template.methodMetadata().template().path()),
                metricSuppliers.timers())
            .time()) {
      decoded = decoder.decode(response, type);
    } catch (IOException | RuntimeException e) {
      metricRegistry
          .meter(
              metricName
                  .metricName(template.methodMetadata(), template.feignTarget(), "error_count")
                  .tagged("exception_name", e.getClass().getSimpleName())
                  .tagged(
                      "root_cause_name", ExceptionUtils.getRootCause(e).getClass().getSimpleName())
                  .tagged("uri", template.methodMetadata().template().path()),
              metricSuppliers.meters())
          .mark();
      throw e;
    } catch (Exception e) {
      metricRegistry
          .meter(
              metricName
                  .metricName(template.methodMetadata(), template.feignTarget(), "error_count")
                  .tagged("exception_name", e.getClass().getSimpleName())
                  .tagged(
                      "root_cause_name", ExceptionUtils.getRootCause(e).getClass().getSimpleName())
                  .tagged("uri", template.methodMetadata().template().path()),
              metricSuppliers.meters())
          .mark();
      throw new IOException(e);
    }

    if (body != null) {
      metricRegistry
          .histogram(
              metricName
                  .metricName(template.methodMetadata(), template.feignTarget(), "response_size")
                  .tagged("uri", template.methodMetadata().template().path()),
              metricSuppliers.histograms())
          .update(body.count());
    }

    return decoded;
  }
Warp feign {@link Decoder} with metrics.
dropwizard-metrics5/src/main/java/feign/metrics5/MeteredDecoder.java