-
Notifications
You must be signed in to change notification settings - Fork 0
Documentation update #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
df66303 to
1be700e
Compare
1be700e to
74169af
Compare
test/demo_SUITE.erl
Outdated
|
|
||
| %% opentelemetry.hrl contains #span_ctx{} record declaration | ||
| -include_lib("opentelemetry_api/include/opentelemetry.hrl"). | ||
| %% otel_tracer.hrl defines tracing marcos (e.g. ?with_span()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| %% 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Span tree is a recursive tuple structure with two elements: | |
| * A span tree is a recursive tuple structure with two elements: |
| * 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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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
| * 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * 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
| * Non-empty pattern list (`[_ | _]`) matches any list containing | ||
| elements that match patterns in the list. Patterns in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Any other pattern value is checked for equality to the data value. | |
| * Any other pattern value is checked for equality with the data value. |
NelsonVides
left a comment
There was a problem hiding this 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.
| {ex_doc, | ||
| [{extras, ["README.md"]}, | ||
| {main, "README.md"}, | ||
| {source_url, "https://github.com/ErlGang/opentelemetry_testing"}]}. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right, excellent 👌🏽
No description provided.