Skip to content

Commit

Permalink
Fix typespec for drop option
Browse files Browse the repository at this point in the history
I forgot to update this in 3fde830. Now we're using the same `keep_fun` type for both `keep` and `drop` to prevent them getting out-of-sync.
  • Loading branch information
jaminthorns committed Sep 9, 2024
1 parent b9675ff commit 80a656d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/telemetry_metrics.ex
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,9 @@ defmodule Telemetry.Metrics do
@type tag :: term()
@type tags :: [tag()]
@type tag_values :: (:telemetry.event_metadata() -> :telemetry.event_metadata())
@type keep ::
@type keep_fun ::
(:telemetry.event_metadata() -> boolean())
| (:telemetry.event_metadata(), :telemetry.event_measurements() -> boolean())
@type drop :: (:telemetry.event_metadata() -> boolean())
@type description :: nil | String.t()
@type unit :: atom()
@type time_unit_conversion() :: {time_unit(), time_unit()}
Expand All @@ -426,8 +425,8 @@ defmodule Telemetry.Metrics do
| {:measurement, measurement()}
| {:tags, tags()}
| {:tag_values, tag_values()}
| {:keep, keep()}
| {:drop, drop()}
| {:keep, keep_fun()}
| {:drop, keep_fun()}
| {:description, description()}
| {:unit, unit() | time_unit_conversion() | byte_unit_conversion()}
| {:reporter_options, reporter_options()}
Expand Down

0 comments on commit 80a656d

Please sign in to comment.