From bd9745d24b63a660bb386b48e23955db7fcf0d0b Mon Sep 17 00:00:00 2001 From: Jesse Van Volkinburg <42327429+vanvoljg@users.noreply.github.com> Date: Tue, 25 Oct 2022 18:09:28 -0700 Subject: [PATCH] Update documentation on telemetry:span/3 --- src/telemetry.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/telemetry.erl b/src/telemetry.erl index e78c849..6e7f75c 100644 --- a/src/telemetry.erl +++ b/src/telemetry.erl @@ -193,8 +193,9 @@ execute([_ | _] = EventName, Measurements, Metadata) when is_map(Measurements) a %% %% When providing `StartMetadata' and `StopMetadata', these values will be sent independently to `start' and %% `stop' events. If an exception occurs, exception metadata will be merged onto the `StartMetadata'. In general, -%% `StopMetadata' should only provide values that are additive to `StartMetadata' so that handlers, such as those -%% used for metrics, can rely entirely on the `stop' event. +%% it is highly recommended that `StopMetadata' should include the values from `StartMetadata' +%% so that handlers, such as those used for metrics, can rely entirely on the `stop' event. Failure to include +%% all of `StartMetadata' in `StopMetadata' can add significant complexity to event handlers. %% %% A default span context is added to event metadata under the `telemetry_span_context' key if none is provided by %% the user in the `StartMetadata'. This context is useful for tracing libraries to identify unique