Changelog
View SourceAll notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
6.0.0 - 2026-11-12
Added
- The
:peep_export_conversion_factorreporter option. The values of a sum, a last_value or a distribution are multiplied by it when they are exported to Prometheus or StatsD. For a distribution, those are its sum and the bounds of its buckets. - An optional
Peep.Storage.register_metrics/2callback, called when Peep starts, which passes a storage backend Peep's metrics and the buckets of each distribution. - A required
Peep.Buckets.boundaries/1callback, which returns the boundaries between a calculator's buckets. Modules thatuse Peep.Buckets.Customget it for free. - This changelog.
Changed
- Breaking:
Peep.Buckets.upper_bound/2returns a float instead of a string. Modules thatuse Peep.Buckets.Customneed no change. - Breaking: The bucket bounds of
Peep.Buckets.Exponential, the default bucket calculator, are exported to Prometheus and StatsD without rounding. They were rounded to 6 decimal places:le="1.222222"is nowle="1.2222222222222223". - Breaking: The buckets of a distribution in the result of
Peep.get_all_metrics/1are keyed by float instead of by string. Implementations ofPeep.Storagemust return them the same way. Peep.Storage.ETSandPeep.Storage.Stripedraise anArgumentErrorthat names the storage and the metric when a float is added to a sum. Both used to fail with a barebadarg.
Fixed
- Identical metrics passed to Peep are deduplicated.
- StatsD lines for a metric without tags no longer end with an empty tag
section (
|#). - A StatsD flush with nothing to report no longer sends an empty packet.
Peep.Plugno longer logs an error when it responds 503 for a worker that isn't running.
5.1.0 - 2026-11-11
Added
- An optional
Peep.Storage.insert_metrics/3callback. A storage backend may export it instead ofinsert_metric/5, and is then passed every sample of a telemetry event in one call.
Changed
- Peep requires Elixir 1.17 or later.
Peep.Storage.Stripedcreates one table per scheduler instead of one per online scheduler, and no longer enableswrite_concurrencyon them.- Faster tagging of metrics with one or two tag keys, and faster inserts into distributions.
Fixed
- A 2-arity
:keepor:dropfunction is passed the event's measurements instead ofnil.
5.0.1 - 2026-04-12
Fixed
- Peep 5.0.0 failed to start when given
:statsdoptions (@yordis).
5.0.0 - 2026-04-01
Changed
- Breaking: Peep requires
:telemetry1.4 or later. - Breaking:
Peep.Storagehas a new required callback,resolve/1. - Breaking:
Peep.Persistent.ids_to_metrics/1returns a tuple instead of a map. - Faster handling of telemetry events.
Removed
- Breaking:
Peep.insert_metric/4,Peep.assign_metric_ids/1andPeep.Persistent.fast_fetch/1.
Fixed
- StatsD no longer sends a line with the value
infinityfor distribution samples above:max_value. - Peep erases its
:persistent_termentry when it stops. - Incorrect type specs.
4.4.0 - 2026-03-03
Changed
- Telemetry events are handled by functions in
Peep.EventHandlerinstead of by a module compiled when Peep starts (@hauleth). Peep.Persistentis a record instead of a struct (@hauleth).- The default storage's ETS table uses
write_concurrency: :auto(@v0idpwn).
Removed
Peep.get_metric/3and thePeep.Storage.get_metric/4callback.
4.3.1 - 2026-01-28
Fixed
- Peep 4.3.0 failed to compile as a dependency (#59).
4.3.0 - 2026-01-23
Added
- Users can provide their own implementations of
Peep.Storage, and test them against the test suite Peep uses internally (@edgurgel).
4.2.1 - 2025-11-27
Fixed
- An incorrect type spec (@v0idpwn).
4.2.0 - 2025-08-25
Fixed
- Peep's Prometheus export crashed while trying to convert terms to strings
that don't implement the
String.Charsprotocol (@pepicrft).
4.1.1 - 2025-08-13
Added
- Support for 2-ary callbacks for the
:keepoption inTelemetry.Metrics(@hauleth).
4.1.0 - 2025-08-12
Added
- Peep emits a
:telemetryevent when reading storage size (@hauleth). - Variables and the results of function calls can be passed in the list of
buckets given to
use Peep.Buckets.Custom(@hauleth).
Changed
- Peep's Prometheus export text conforms to OpenMetrics (@hauleth).
Peep.Storage.Stripeduses a tuple instead of a map to access its ETS tables (@hauleth).- Performance improvements to
Peep.Codegen, removing some runtime indirection overhead (@hauleth). - The threshold length that
Peep.Buckets.Customuses to decide between linear search and binary search was fine-tuned (@hauleth).
Fixed
- Incorrect escaping in Peep's Prometheus export (@hauleth).
4.0.0 - 2025-05-12
Added
Peep.Codegen, an internal module that compiles a module on Peep startup with ahandle_event/4function that replacesPeep.EventHandler.handle_event/4. This avoids the overhead of copying data out of:telemetry's ETS table into a calling process's heap.
Changed
- Breaking: Peep drops non-number measurements for last-value metrics (reported by @akoutmos).
- Peep automatically adds global tags to metrics, rather than forcing users to
repeatedly specify the global tag keys in
:tagsfor every metric (reported by @yordis). - Peep gives integer ids to each metric, and uses those integer ids instead of
Telemetry.Metricsstructs when looking up data in ETS tables.
3.5.0 - 2025-02-28
Added
Peep.prune_tags/2, which deletes metrics based on matching tag values.
3.4.2 - 2025-01-31
Fixed
- A bug around quote-escaping labels in Peep's Prometheus export (@hauleth).
3.4.1 - 2025-01-03
Changed
- Peep requires Elixir 1.15 or later.
Fixed
- Plug was required at compile-time. It is now truly an optional dependency (@scudelletti).
3.4.0 - 2024-12-30
Added
- A compile-time
:bucket_calculatoroption, making it possible to globally specify aPeep.Bucketsimplementation for all distribution metrics (@yordis).
Changed
- Several optimizations to the Prometheus export code (@josevalim).
Peep.Buckets.Customswitches from linear function head matching to binary search for large numbers of buckets, among other optimizations (@hissssst).
3.3.1 - 2024-11-26
Added
- The
:on_unmatched_pathoption forPeep.Plug, which decides the behaviour whenPeep.Plugis called with an unexpected path::continuewhen serving Peep metrics from the same HTTP server as your application, and:haltwhen serving them from a separate listener.
Fixed
- The Bandit example in the documentation (@yordis).
3.3.0 - 2024-10-31
Added
- The
:stripedstorage, which trades increased memory usage for reduced lock contention. Rather than storing all metrics in a single ETS table, it uses one ETS table for each scheduler thread. Peep.storage_size/1.
3.2.1 - 2024-10-30
Fixed
- Peep processes ignore unexpected messages instead of terminating (@mjm).
- Peep detaches its event handlers whatever the reason it terminates (@mjm).
3.2.0 - 2024-08-08
Added
Peep.Plug, an easy way to expose Peep metrics (@aloukissas).
3.1.0 - 2024-07-29
Added
- The
:prometheus_typereporter option, which overrides the type of a sum or last value metric in the Prometheus exposition (@hauleth).
3.0.0 - 2024-07-11
Added
- The Apache 2.0 licence text.
Changed
- Breaking: The
:global_tagsoption is a map instead of a keyword list. - Metric tags are stored in maps (@hauleth).
Peep.Buckets.Exponentialprecomputes:math.log(gamma)for a slight performance boost.
2.1.3 - 2024-04-11
Fixed
- The Prometheus export of
true,falseandnilvalues, and ofnillabel values.
2.1.2 - 2024-01-19
Changed
- The requirements on
:nimble_optionsand:telemetry_metricsare loosened to>= 1.0.0and>= 0.6.0.
2.1.1 - 2024-01-18
Fixed
- Peep detaches its event handlers on shutdown (@contested-space).
2.1.0 - 2023-11-22
Changed
- Counters and sums are stored once per scheduler, to reduce contention.
2.0.1 - 2023-10-31
Fixed
- Distributions without a
:max_valuereporter option were dropped (@contested-space).
2.0.0 - 2023-10-16
Added
- Support for custom bucket boundaries. The default log-linear bucketing
strategy becomes
Peep.Buckets.Exponential, an implementation of the newPeep.Bucketsbehaviour, andPeep.Buckets.Customdefines bucket boundaries of your own.
Removed
- Breaking: The
distribution_bucket_variabilityoption.
Fixed
- An issue with Prometheus exposition where zero-valued bucket time series are not shown.
Peep.Buckets.Exponentialputs values below 1, including negative values, in its first bucket.
1.0.1 - 2023-09-11
Changed
- Peep's ETS table is created with
write_concurrencyanddecentralized_counters.
Fixed
- A deprecation warning for
Logger.warn/1.
1.0.0 - 2023-05-02
Added
- Initial release.