From 91e91e78c8c0e93795262a7c85e56fec6bc41747 Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Thu, 22 Aug 2024 17:32:12 +0200 Subject: [PATCH 1/3] Update docs --- README.md | 2 +- src/telemetry.erl | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index df8578e..fba8c02 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ apply. If an exception does occur, an `EventPrefix ++ [exception]` event will be will be re-raised. The measurements for the `EventPrefix ++ [start]` event will contain a key called `system_time` which is -derived by calling `erlang:system_time()`. For `EventPrefix ++ [stop]` and `EventPrefix ++ [exception]` +derived by calling `erlang:system_time/0`. For `EventPrefix ++ [stop]` and `EventPrefix ++ [exception]` events, the measurements will contain a key called `duration` and its value is derived by calling `erlang:monotonic_time() - StartMonotonicTime`. All events include a `monotonic_time` measurement too. All of them represent time as native units. diff --git a/src/telemetry.erl b/src/telemetry.erl index d81239c..7f4bb28 100644 --- a/src/telemetry.erl +++ b/src/telemetry.erl @@ -52,7 +52,7 @@ and `execute/2`. ?DOC(""" Attaches the handler to the event. -`handler_id` must be unique, if another handler with the same ID already exists the +`HandlerId` must be unique, if another handler with the same ID already exists the `{error, already_exists}` tuple is returned. See `execute/3` to learn how the handlers are invoked. @@ -85,9 +85,9 @@ attach(HandlerId, EventName, Function, Config) -> ?DOC(""" Attaches the handler to many events. -The handler will be invoked whenever any of the events in the `event_names` list is emitted. Note +The handler will be invoked whenever any of the events in the `EventNames` list is emitted. Note that failure of the handler on any of these invocations will detach it from all the events in -`event_name` (the same applies to manual detaching using `detach/1`). +`EventNames` (the same applies to manual detaching using `detach/1`). Note: due to how anonymous functions are implemented in the Erlang VM, it is best to use function captures (i.e. `fun mod:fun/4` in Erlang or `&Mod.fun/4` in Elixir) as event handlers @@ -146,7 +146,7 @@ arguments: #### Best practices and conventions: -While you are able to emit messages of any `event_name` structure, it is recommended that you follow the +While you are able to emit messages of any `t:event_name/0` structure, it is recommended that you follow the the guidelines laid out in `span/3` if you are capturing start/stop events. """). -spec execute(EventName, Measurements, Metadata) -> ok when From 5066c7f375280d9e9e9162f7a86b911fd6830914 Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Thu, 22 Aug 2024 17:32:27 +0200 Subject: [PATCH 2/3] Update plugins setup --- rebar.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebar.config b/rebar.config index e85ccb2..965e025 100644 --- a/rebar.config +++ b/rebar.config @@ -19,7 +19,7 @@ {xref_checks,[undefined_function_calls, undefined_functions, locals_not_used, deprecated_function_calls, deprecated_functions]}. -{plugins, [rebar3_ex_doc]}. +{project_plugins, [rebar3_hex, rebar3_ex_doc]}. {hex, [ {doc, #{provider => ex_doc}} From d4350aef4c0c486534a50acaa1f8f1ea979b9f57 Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Thu, 22 Aug 2024 17:39:38 +0200 Subject: [PATCH 3/3] Release v1.3.0 --- CHANGELOG.md | 12 ++++++++++++ src/telemetry.app.src | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3d734b..ab64d70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,18 @@ 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). +## [1.3.0](https://github.com/elixir-telemetry/telemetry/tree/v1.3.0) + +### Added + +- Ability to return extra measurements from `telemetry:span/3`. + +### Changed + +- Rewrite docs from edoc to OTP 27 `-moduledoc`/`-doc`. + + Internal macros `?DOC` and `?MODULEDOC` are used. They are no-ops prior to OTP 27. + ## [1.2.1](https://github.com/elixir-telemetry/telemetry/tree/v1.2.0) ### Fixed diff --git a/src/telemetry.app.src b/src/telemetry.app.src index 76c6037..7b75041 100644 --- a/src/telemetry.app.src +++ b/src/telemetry.app.src @@ -1,6 +1,6 @@ {application, telemetry, [{description, "Dynamic dispatching library for metrics and instrumentations"}, - {vsn, "1.2.1"}, + {vsn, "1.3.0"}, {registered, []}, {mod, {telemetry_app, []}}, {applications, @@ -11,7 +11,7 @@ {modules, []}, {licenses, ["Apache-2.0"]}, - {links, [{"Github", "https://github.com/beam-telemetry/telemetry"}]}, + {links, [{"GitHub", "https://github.com/beam-telemetry/telemetry"}]}, {doc, "doc"}, {include_files, ["mix.exs"]} ]}.