Skip to content

Add integration tests for tracing compliance#662

Merged
tidal merged 9 commits into
open-telemetry:mainfrom
yuktea:span-builder-compliance-tests
Apr 17, 2022
Merged

Add integration tests for tracing compliance#662
tidal merged 9 commits into
open-telemetry:mainfrom
yuktea:span-builder-compliance-tests

Conversation

@yuktea

@yuktea yuktea commented Apr 14, 2022

Copy link
Copy Markdown
Contributor

Some additional tests for the Span Builder SDK that verify:

  1. Attributes are merged correctly
  2. Setting attributes after calling startSpan() should not work
    plus some additional tests for setting null and empty string values to attributes.

UPDATE: I commented out one of the tests that I was not totally sure of.
(unsure if setAttribute() should work with empty string '' values.)

@yuktea
yuktea marked this pull request as draft April 14, 2022 16:15
@yuktea
yuktea marked this pull request as ready for review April 14, 2022 16:26
@codecov

codecov Bot commented Apr 14, 2022

Copy link
Copy Markdown

Codecov Report

Merging #662 (b5c2cee) into main (ca05f51) will decrease coverage by 0.16%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #662      +/-   ##
============================================
- Coverage     84.45%   84.28%   -0.17%     
- Complexity     1141     1153      +12     
============================================
  Files           127      128       +1     
  Lines          2766     2788      +22     
============================================
+ Hits           2336     2350      +14     
- Misses          430      438       +8     
Flag Coverage Δ
7.4 84.23% <ø> (-0.17%) ⬇️
8.0 84.28% <ø> (-0.17%) ⬇️
8.1 84.28% <ø> (-0.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/SDK/Common/Dev/Compatibility/Util.php 92.59% <0.00%> (-7.41%) ⬇️
src/SDK/Trace/TracerProvider.php 100.00% <0.00%> (ø)
src/Contrib/Otlp/SpanConverter.php 100.00% <0.00%> (ø)
src/SDK/Resource/ResourceInfoFactory.php 0.00% <0.00%> (ø)
src/SDK/Common/Instrumentation/KeyGenerator.php 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca05f51...b5c2cee. Read the comment docs.

Comment thread tests/Integration/SDK/SpanBuilderTest.php Outdated
Comment thread tests/Integration/SDK/SpanBuilderTest.php Outdated
Comment thread tests/Integration/SDK/SpanBuilderTest.php Outdated
Comment thread tests/Integration/SDK/SpanBuilderTest.php Outdated
@brettmc

brettmc commented Apr 14, 2022

Copy link
Copy Markdown
Contributor

any tests which are verifying behaviour from the spec compliance matrix need a group annotation, please

Modified the names of the tests to be more descriptive and added the
`@group compliance` notation.
Additionally, I commented out one of the tests that I was not totally
sure of. (unsure if `setAttribute()` should work with empty string `''`
values.
@yuktea
yuktea marked this pull request as draft April 15, 2022 08:11
@yuktea
yuktea marked this pull request as ready for review April 15, 2022 08:24
Comment thread tests/Integration/SDK/SpanBuilderTest.php Outdated
Comment thread tests/Integration/SDK/SpanBuilderTest.php Outdated
Comment thread tests/Integration/SDK/SpanBuilderTest.php Outdated
Comment thread tests/Integration/SDK/SpanBuilderTest.php
Comment thread tests/Integration/SDK/SpanBuilderTest.php Outdated
Comment thread tests/Integration/SDK/SpanBuilderTest.php Outdated
Comment thread tests/Integration/SDK/SpanBuilderTest.php
yuktea added 2 commits April 16, 2022 03:01
Removed `$span->end()` calls as they shouldn't be necessary
@yuktea
yuktea marked this pull request as draft April 16, 2022 20:00
@yuktea yuktea changed the title Add integration tests for span builder Add integration tests for tracing compliance Apr 16, 2022
yuktea added 3 commits April 17, 2022 01:32
Test to get default tracer. Also, added `@group` php unit annotation for
tests to check specification compliance
@yuktea
yuktea marked this pull request as ready for review April 16, 2022 21:09
@tidal

tidal commented Apr 17, 2022

Copy link
Copy Markdown
Member

@yuktea
Thx! LGTM

@tidal
tidal merged commit 1d5283b into open-telemetry:main Apr 17, 2022
@yuktea
yuktea deleted the span-builder-compliance-tests branch June 2, 2022 02:43
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.

4 participants