Skip to content

Latest commit

 

History

History
127 lines (74 loc) · 4.34 KB

CHANGELOG.md

File metadata and controls

127 lines (74 loc) · 4.34 KB

Changelog

All 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.

No changes. API is considered stable.

Changed

Fix warnings and make some internal functions private.

Added

  • Support latest telemetry

This release brings an improvement that helps to track metrics based on event's metadata. The :measurement option now accepts a two-arity function that takes both event measurements and metadata, and returns a final measurement to be tracked by the metric.

Starting with this version Telemetry.Metrics requires minimum Elixir 1.7.0.

Changed

  • Extended the :measurement option to accept a function taking both event measurements and metadata.

This release brings two new metric options, :keep and :drop, which allow users to specify which telemetry events should be taken into account when collecting metrics. Reporters supporting this version of Telemetry.Metrics need to respect these filtering rules.

In addition, the requirement to specify the distribution buckets has been dropped, since not all reporters require configuration of buckets up front. Reporters which need the buckets to be defined on the metric struct should accept it via :reporter_options.

Added

  • :keep and :drop options to filter events based on metadata

Removed

  • the :buckets option on the distribution metric

Fixed

  • fixed a bug where unit conversion would fail if the measurement was missing

Fixed

  • fixed a bug where unit conversion would fail if the measurement was nil

Added

  • add :reporter_options option to all metric definitions for supplying reporter-specific configuration

Changed

  • Telemetry.Metrics.t type is now defined as a union of base metric definitions provided by the library

Added

  • Add support for bytes, kilobytes and megabytes conversion

Added

  • add Telemetry.Metrics.ConsoleReporter as an example reporter that prints data to the terminal
  • add summary/2 metric type
  • add shortcut representation for :buckets in the distribution/2 metric

Fixed

  • dialyzer no longer fails on valid calls to distribution/2 with :buckets option

This release makes the library compatible with Telemetry v0.4.0. This means that metric values are now based on one of the measurements. The first argument to all metric definition now specifies the metric name, but also the source event name and the measurement - however, both of them can be overridden using options.

Added

  • support for Telemetry v0.4.0 - the measurement can be configured indirectly via metric name or a :measurement option
  • :tag_values option to apply final transformations to event metadata before it's used for tags
  • :event_name and :measurement to override event name and measurement set via metric name
  • ability to convert time unit of measurement via :unit option

Changed

  • first argument to all metric definitions is a metric name instead of event name
  • :unit option now also accepts a tuple specifying the conversion of time unit of measurement

Removed

  • :metadata option - :tag_values can be used to transform event metadata now instead

Added

  • four metric specifications, counter/2, sum/2, last_value/2 and distribution/2