Skip to content

Commit

Permalink
Release v1.3.0 (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach authored Aug 22, 2024
1 parent 98714d1 commit 8d8af76
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
4 changes: 2 additions & 2 deletions src/telemetry.app.src
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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"]}
]}.
8 changes: 4 additions & 4 deletions src/telemetry.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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`).
<b>Note:</b> 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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8d8af76

Please # to comment.