# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.5.0](https://github.com/tokio-rs/tokio-metrics/compare/v0.4.9...v0.5.0) - 2026-04-09

### Breaking Changes

- `RuntimeMetrics::poll_time_histogram` is now a `PollTimeHistogram` instead of `Vec<u64>`. Each bucket carries its duration range alongside the count. ([#121](https://github.com/tokio-rs/tokio-metrics/pull/121))

### Added

- Add `metrique-integration` feature to use `RuntimeMetrics` as a metrique unit of work ([#121](https://github.com/tokio-rs/tokio-metrics/pull/121))

### Other

- Fix doctests failing after Tokio v1.51 ([#122](https://github.com/tokio-rs/tokio-metrics/pull/122))

## [0.4.9](https://github.com/tokio-rs/tokio-metrics/compare/v0.4.8...v0.4.9) - 2026-02-23

### Added

- *(task)* Expose a static-friendly TaskMonitorCore without inner Arc ([#115](https://github.com/tokio-rs/tokio-metrics/pull/115))

### Other

- Fix doctest feature gates and relax rt requirement for task metrics reporter ([#118](https://github.com/tokio-rs/tokio-metrics/pull/118))

## [0.4.8](https://github.com/tokio-rs/tokio-metrics/compare/v0.4.7...v0.4.8) - 2026-02-16

### Added

- publicly export task `TaskIntervals` type ([#112](https://github.com/tokio-rs/tokio-metrics/pull/112))

### Fixed

- use saturating_sub to prevent overflow panics in runtime metrics ([#114](https://github.com/tokio-rs/tokio-metrics/pull/114))

# 0.4.7 (January 15, 2025)
- docs: fix typos in `TaskMetrics` ([#103])
- rt: integrate derived metrics with metrics.rs ([#104])
- fix: indentation in task.rs ([#105])
- docs: update readme and crate documentation ([#107])
- rt: make `live_tasks_count` (`num_alive_tasks()`) stable([#108])
- docs: move `live_tasks_count` to stable metrics in README ([#109])

[#103]: https://github.com/tokio-rs/tokio-metrics/pull/103
[#104]: https://github.com/tokio-rs/tokio-metrics/pull/104
[#105]: https://github.com/tokio-rs/tokio-metrics/pull/105
[#107]: https://github.com/tokio-rs/tokio-metrics/pull/107
[#108]: https://github.com/tokio-rs/tokio-metrics/pull/108
[#109]: https://github.com/tokio-rs/tokio-metrics/pull/109

# 0.4.6 (December 3rd, 2025)
- add metrics_rs integration to task metrics ([#100])
- readme: add max_idle_duration to readme ([#98])
- readme: keep default features ([#29])

[#29]: https://github.com/tokio-rs/tokio-metrics/pull/29
[#98]: https://github.com/tokio-rs/tokio-metrics/pull/98
[#100]: https://github.com/tokio-rs/tokio-metrics/pull/100

# 0.4.5 (September 4th, 2025)
- Add max_idle_duration ([#95])

[#95]: https://github.com/tokio-rs/tokio-metrics/pull/95

# 0.4.4 (August 5th, 2025)

### Added
 - fix: Add TaskIntervals struct ([#91])
 - chore: update dev-dependencies ([#92])

[#91]: https://github.com/tokio-rs/tokio-metrics/pull/91
[#92]: https://github.com/tokio-rs/tokio-metrics/pull/92

# 0.4.3 (July 3rd, 2025)

### Added
 - rt: partially stabilize `RuntimeMonitor` and related metrics ([#87])

[#87]: https://github.com/tokio-rs/tokio-metrics/pull/87

# 0.4.2 (April 30th, 2025)

### Fixed
 - docs: specify metrics-rs-integration feature dependency for relevant APIs ([#78])
 - docs: fix links ([#79])

[#78]: https://github.com/tokio-rs/tokio-metrics/pull/78
[#79]: https://github.com/tokio-rs/tokio-metrics/pull/79

# 0.4.1 (April 20th, 2025)

### Added
 - rt: add support for `blocking_queue_depth`, `live_task_count`, `blocking_threads_count`,
   `idle_blocking_threads_count` ([#49], [#74])
 - rt: add integration with metrics.rs ([#68])

[#49]: https://github.com/tokio-rs/tokio-metrics/pull/49
[#68]: https://github.com/tokio-rs/tokio-metrics/pull/68
[#74]: https://github.com/tokio-rs/tokio-metrics/pull/74

# 0.4.0 (November 26th, 2024)

The core Tokio crate has renamed some of the metrics and this breaking release
uses the new names. The minimum required Tokio is bumped to 1.41, and the MSRV
is bumped to 1.70 to match.

- runtime: use new names for poll time histogram ([#66])
- runtime: rename injection queue to global queue ([#66])
- doc: various doc fixes ([#66], [#65])

[#65]: https://github.com/tokio-rs/tokio-metrics/pull/65
[#66]: https://github.com/tokio-rs/tokio-metrics/pull/66

# 0.3.1 (October 12th, 2023)

### Fixed
- task: fix doc error in idle definition ([#54])
- chore: support tokio 1.33 without stats feature ([#55])

[#54]: https://github.com/tokio-rs/tokio-metrics/pull/54
[#55]: https://github.com/tokio-rs/tokio-metrics/pull/55

# 0.3.0 (August 14th, 2023)

### Added
- rt: add support for mean task poll time ([#50])
- rt: add support for task poll count histogram ([#52])

[#50]: https://github.com/tokio-rs/tokio-metrics/pull/50
[#52]: https://github.com/tokio-rs/tokio-metrics/pull/52

# 0.2.2 (April 13th, 2023)
### Added
- task: add TaskMonitorBuilder ([#46])

### Fixed
- task: fix default long delay threshold ([#46])

[#46]: https://github.com/tokio-rs/tokio-metrics/pull/46

# 0.2.1 (April 5th, 2023)

### Added
- task: add short and long delay metrics ([#44])

[#44]: https://github.com/tokio-rs/tokio-metrics/pull/44

# 0.2.0 (March 6th, 2023)

### Added
- Add `Debug` implementations. ([#28])
- rt: add concrete `RuntimeIntervals` iterator type ([#26])
- rt: add budget_forced_yield_count metric ([#39])
- rt: add io_driver_ready_count metric ([#40])
- rt: add steal_operations metric ([#37])
- task: also instrument streams ([#31])

### Documented
- doc: fix count in `TaskMonitor` docstring ([#24])
- doc: the description of steal_count ([#35])

[#24]: https://github.com/tokio-rs/tokio-metrics/pull/24
[#26]: https://github.com/tokio-rs/tokio-metrics/pull/26
[#28]: https://github.com/tokio-rs/tokio-metrics/pull/28
[#31]: https://github.com/tokio-rs/tokio-metrics/pull/31
[#35]: https://github.com/tokio-rs/tokio-metrics/pull/35
[#37]: https://github.com/tokio-rs/tokio-metrics/pull/37
[#39]: https://github.com/tokio-rs/tokio-metrics/pull/39
[#40]: https://github.com/tokio-rs/tokio-metrics/pull/40
