Skip to content

Conversation

@DenysGonchar
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.59%. Comparing base (1993422) to head (44d67a1).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #2   +/-   ##
=======================================
  Coverage   99.59%   99.59%           
=======================================
  Files           6        6           
  Lines         246      246           
=======================================
  Hits          245      245           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DenysGonchar DenysGonchar force-pushed the documentation-update branch 5 times, most recently from df66303 to 1be700e Compare October 28, 2025 14:37

%% opentelemetry.hrl contains #span_ctx{} record declaration
-include_lib("opentelemetry_api/include/opentelemetry.hrl").
%% otel_tracer.hrl defines tracing marcos (e.g. ?with_span())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
%% otel_tracer.hrl defines tracing marcos (e.g. ?with_span())
%% otel_tracer.hrl defines tracing macros (e.g. ?with_span())

README.md Outdated
* or call `ensure_started/0` at the `SuiteModule:init_per_suite/1`
interface for Common Test. Since CT doesn't run multiple suites
in parallel, you may also want to reset `span_collector` ETS table
using `reset/0` interface.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
using `reset/0` interface.
using the `reset/0` interface.

README.md Outdated
2) If possible, wrap your test scenario in a dummy root span.
* Use `OpenTelemetry.Tracer.with_span/2` macro for Elixir projects
* or `?with_span/3` macro from `otel_tracer.hrl` for Erlang projects.
* Extract root span's `trace_id` and `span_id` (you can use
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Extract root span's `trace_id` and `span_id` (you can use
* Extract the root span's `trace_id` and `span_id` (you can use the

README.md Outdated
`OpentelemetryTesting.get_span_ids/0` helper function for Elixir projects).

3) Wait for the root span to be reported and build the span tree for it.
* Use `wait_for_span/3` and `build_span_tree/2` functions for this.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Use `wait_for_span/3` and `build_span_tree/2` functions for this.
* Use the `wait_for_span/3` and `build_span_tree/2` functions for this.

README.md Outdated

3) Wait for the root span to be reported and build the span tree for it.
* Use `wait_for_span/3` and `build_span_tree/2` functions for this.
* Span tree is a recursive tuple structure with two elements:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Span tree is a recursive tuple structure with two elements:
* A span tree is a recursive tuple structure with two elements:
Suggested change
* Span tree is a recursive tuple structure with two elements:
* The -pan tree is a recursive tuple structure with two elements:

README.md Outdated
* `'_'` atom matches anything.
* Atoms that start with a `$` sign (e.g. `'$some_var'`) match anything,
the matched value is also stored and returned.
Note that if such special atom is used twice in the pattern,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note that if such special atom is used twice in the pattern,
Note that if such a special atom is used twice in the pattern,

README.md Outdated
Comment on lines 116 to 120
* Match function (function with arity 1, `fun matcher_fn/1`),
should return a boolean value. But crashing or any non `true`
value is treated as a failed matching. If you want to check
for equality to some special atom or a function with arity 1,
you have to use a match function:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Match function (function with arity 1, `fun matcher_fn/1`),
should return a boolean value. But crashing or any non `true`
value is treated as a failed matching. If you want to check
for equality to some special atom or a function with arity 1,
you have to use a match function:
* A match function (a function with arity 1, `fun matcher_fn/1`),
should return a boolean value. However, crashing or any non-true
value is treated as a failed matching. If you want to check
for equality against some special atom or a function with arity 1,
you have to use a match function:

README.md Outdated
Comment on lines 125 to 126
* Non-empty pattern list (`[_ | _]`) matches any list containing
elements that match patterns in the list. Patterns in the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Non-empty pattern list (`[_ | _]`) matches any list containing
elements that match patterns in the list. Patterns in the
* Non-empty pattern list (`[_ | _]`) matches any list where all patterns in the pattern list have at least one matching element in the data list. Patterns in the

README.md Outdated
against the corresponding data element. The size of the pattern
tuple must be equal to the size of the data tuple.
* For map patterns, the corresponding data map must have identical
keys as the pattern map, and the corresponding data values are
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
keys as the pattern map, and the corresponding data values are
keys to the pattern map, and the corresponding data values are

README.md Outdated
keys as the pattern map, and the corresponding data values are
matched against pattern values. An empty map `#{}` pattern
matches any map.
* Any other pattern value is checked for equality to the data value.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Any other pattern value is checked for equality to the data value.
* Any other pattern value is checked for equality with the data value.

Copy link
Collaborator

@NelsonVides NelsonVides left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, only one comment.

Comment on lines -17 to -20
{ex_doc,
[{extras, ["README.md"]},
{main, "README.md"},
{source_url, "https://github.com/ErlGang/opentelemetry_testing"}]}.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing these? Don't you want to generate ex_doc ready docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it seems that using mix for this is a better idea.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right, excellent 👌🏽

@DenysGonchar DenysGonchar marked this pull request as ready for review October 28, 2025 22:00
@DenysGonchar DenysGonchar merged commit efc7ebb into main Oct 28, 2025
5 checks passed
@DenysGonchar DenysGonchar deleted the documentation-update branch October 28, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants