Metrics integration with Sentry.
Provides functions for sending counters, gauges, and distributions:
increment - Track incrementing values (e.g., button clicks, function calls)gauge - Track values that go up and down (e.g., memory usage, queue depth)distribution - Track value distributions (e.g., response times)(increment "page_view")
(gauge "queue_depth" 42.0)
(distribution "response_time" 187.5 :millisecond)
(distribution "page_load" 1.0 :millisecond {:browser "Firefox"})
(increment "api_call" 1.0 nil {:endpoint "/users"})
Metrics integration with Sentry.
Provides functions for sending counters, gauges, and distributions:
- `increment` - Track incrementing values (e.g., button clicks, function calls)
- `gauge` - Track values that go up and down (e.g., memory usage, queue depth)
- `distribution` - Track value distributions (e.g., response times)
## Basic Usage
```clojure
(increment "page_view")
(gauge "queue_depth" 42.0)
(distribution "response_time" 187.5 :millisecond)
```
## With Attributes
```clojure
(distribution "page_load" 1.0 :millisecond {:browser "Firefox"})
(increment "api_call" 1.0 nil {:endpoint "/users"})
```(distribution metric-name value)(distribution metric-name value unit)(distribution metric-name value unit attrs)Record a distribution metric value.
(distribution name value) — record value(distribution name value unit) — with unit keyword or string(distribution name value unit attrs) — with attributes mapRecord a distribution metric value. - `(distribution name value)` — record value - `(distribution name value unit)` — with unit keyword or string - `(distribution name value unit attrs)` — with attributes map
(gauge metric-name value)(gauge metric-name value unit)(gauge metric-name value unit attrs)Record a gauge metric value.
(gauge name value) — record value(gauge name value unit) — with unit keyword or string(gauge name value unit attrs) — with attributes mapRecord a gauge metric value. - `(gauge name value)` — record value - `(gauge name value unit)` — with unit keyword or string - `(gauge name value unit attrs)` — with attributes map
(increment metric-name)(increment metric-name value)(increment metric-name value unit)(increment metric-name value unit attrs)Increment a counter metric.
Wraps Sentry.metrics().count().
Named increment to avoid clash with clojure.core/count.
(increment name) — increment by 1.0(increment name value) — increment by value(increment name value unit) — with unit keyword or string(increment name value unit attrs) — with attributes mapIncrement a counter metric. Wraps Sentry.metrics().count(). Named `increment` to avoid clash with clojure.core/count. - `(increment name)` — increment by 1.0 - `(increment name value)` — increment by value - `(increment name value unit)` — with unit keyword or string - `(increment name value unit attrs)` — with attributes map
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |