pedestal

2025-11-29T17:15:19.419509Z

Metrics in 0.8.1 – how do I add attributes per-event, not only per-metric? It works for metrics/increment-counter. For the other metric types, it seems that the create-time attributes are used for all subsequent recordings. My use case is to add attributes like http.request.method or http.response.status_code as attributes per-event. Should the returned metric fns have an extra arity to allow adding per-event attributes? E.g.

(fn ([^double value] (.record histogram value attributes'))
    ([^double value event-attrs] (.record histogram value (merge attributes' event-attrs))))

2026-01-30T18:56:12.233839Z

Thanks! https://github.com/pedestal/pedestal/issues/989

hlship 2025-12-29T20:52:48.714959Z

That seems like a reasonable idea, please add an issue for tracking.