Liking cljdoc? Tell your friends :D

sentry-clj.metrics

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

(increment "page_view")
(gauge "queue_depth" 42.0)
(distribution "response_time" 187.5 :millisecond)

With Attributes

(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"})
```
raw docstring

distributionclj

(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 map
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 map
sourceraw docstring

gaugeclj

(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 map
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 map
sourceraw docstring

incrementclj

(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 map
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 map
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close