Merged
Conversation
2dc2dae to
3d8fb69
Compare
Right now the span was started once, immediately when the `wrap` function was called and then ended at the end of each function invocation. This created weird traces when a) the function wasn't called immediately and b) when it was called more than once. With these changes, a new span is started for each invocation at the beginning of that invocation and ended at the end of that invocation. This creates traces that match expectations in all scenarios. It also uses the `with_span` function to handle the start + stop, instead of doing this manually, to simplify the code here. The dependency versions were increased slightly because the `OpenTelemetry.Tracer.record_exception/1` shorthand was [added in v1.1.0][1]. Diff best viewed with whitespace ignored. [1]: open-telemetry/opentelemetry-erlang#410
We have the message available there, might as well use it.
3d8fb69 to
4294dc2
Compare
The v2 GitHub actions are no longer supported. Upgrade to latest. Also upgrades one of the jobs to run against the latest Elixir & OTP versions. The other one keeps running against the oldest supported versions.
The `erlef/setup-beam@v1` action fails with the following error: > Error: Requested loose Erlang/OTP version (23.0) not found in version list Based on [their readme][1], the earliest supported OTP version for the latest Ubuntu is 24.3. And OTP 24 support was added in Elixir 1.12. So we need to bump the oldest supported version to run these tests. [1]: https://github.com/erlef/setup-beam?tab=readme-ov-file#compatibility-between-operating-system-and-erlangotp
d8979e2 to
0e829e0
Compare
It was giving the following warning without this: ``` warning: Range.new/2 and first..last default to a step of -1 when last < first. Use Range.new(first, last, -1) or first..last//-1, or pass 1 if that was your intention ```
It was failing with `:prettypr` being undefined. After the upgrade `mix dialyxir` works as expected.
nsalong
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Right now the span was started once, immediately when the
wrapfunction was called and then ended at the end of each function
invocation. This created weird traces when a) the function wasn't called
immediately and b) when it was called more than once.
With these changes, a new span is started for each invocation at the
beginning of that invocation and ended at the end of that invocation.
This creates traces that match expectations in all scenarios.
It also uses the
with_spanfunction to handle the start + stop,instead of doing this manually, to simplify the code here.
Diff best viewed with whitespace ignored.