Skip to content

Add basic cancellation support for async implementations#782

Merged
brettmc merged 1 commit into
open-telemetry:mainfrom
Nevay:feature/cancellation
Aug 2, 2022
Merged

Add basic cancellation support for async implementations#782
brettmc merged 1 commit into
open-telemetry:mainfrom
Nevay:feature/cancellation

Conversation

@Nevay

@Nevay Nevay commented Jul 19, 2022

Copy link
Copy Markdown
Contributor

Allows async implementations to subscribe to timeouts etc.

@codecov

codecov Bot commented Jul 19, 2022

Copy link
Copy Markdown

Codecov Report

Merging #782 (b69dc19) into main (2f6658f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #782   +/-   ##
=========================================
  Coverage     79.52%   79.52%           
  Complexity     1405     1405           
=========================================
  Files           160      160           
  Lines          3468     3468           
=========================================
  Hits           2758     2758           
  Misses          710      710           
Flag Coverage Δ
7.4 79.52% <100.00%> (ø)
8.0 79.59% <100.00%> (ø)
8.1 79.59% <100.00%> (ø)

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

Impacted Files Coverage Δ
.../SDK/Trace/Behavior/SpanExporterDecoratorTrait.php 100.00% <100.00%> (ø)
src/SDK/Trace/Behavior/SpanExporterTrait.php 100.00% <100.00%> (ø)
src/SDK/Trace/SpanProcessor/BatchSpanProcessor.php 100.00% <100.00%> (ø)
src/SDK/Trace/SpanProcessor/MultiSpanProcessor.php 100.00% <100.00%> (ø)
src/SDK/Trace/SpanProcessor/NoopSpanProcessor.php 100.00% <100.00%> (ø)
...rc/SDK/Trace/SpanProcessor/SimpleSpanProcessor.php 100.00% <100.00%> (ø)
src/SDK/Trace/TracerProvider.php 100.00% <100.00%> (ø)
src/SDK/Trace/TracerSharedState.php 100.00% <100.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 2f6658f...b69dc19. Read the comment docs.

@brettmc

brettmc commented Aug 1, 2022

Copy link
Copy Markdown
Contributor

@Nevay looks good to me, there's a conflict to be resolved.

@Nevay
Nevay force-pushed the feature/cancellation branch from 0b1f528 to b69dc19 Compare August 1, 2022 07:18
@Nevay

Nevay commented Aug 1, 2022

Copy link
Copy Markdown
Contributor Author

Rebased and removed cancellation from SpanExporterTrait::doExport(); the trait isn't useful for async implementations as ::forceFlush() and ::shutdown() should block.

[ForceFlush] is a hint to ensure that the export [...] SHOULD be completed as soon as possible, preferably before returning from this method.

@brettmc
brettmc merged commit e946dc7 into open-telemetry:main Aug 2, 2022
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.

2 participants