Skip to content
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

PeriodicReader::build make interval registration in same thread/task #2133

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

fraillt
Copy link
Contributor

@fraillt fraillt commented Sep 20, 2024

Changes

Previous behavior was that in PeriodicReader::build interval was registered before spawning a task. Which means that we effectively need already running runtime in order to register an interval.

This revision moves interval registration within spawn function, which allow to register PeriodicReader independently of any runtime.

You can see in test collection_triggered_by_interval, that this works perfectly fine without any runtime when using TokioCurrentThread.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@fraillt fraillt requested a review from a team as a code owner September 20, 2024 14:32
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.7%. Comparing base (3347bde) to head (dcc3b5b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2133   +/-   ##
=====================================
  Coverage   78.7%   78.7%           
=====================================
  Files        121     121           
  Lines      20851   20849    -2     
=====================================
- Hits       16429   16428    -1     
+ Misses      4422    4421    -1     

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

Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

LGTM!

@cijothomas cijothomas merged commit a8d62c1 into open-telemetry:main Sep 20, 2024
25 checks passed
@fraillt fraillt deleted the period-reader-interval-fix branch September 22, 2024 18:35
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