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

impl(otel): no spans if no sleeps #13125

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

dbolduc
Copy link
Member

@dbolduc dbolduc commented Nov 13, 2023

Motivated by #12959

I still like invoking the sleeper even when the duration is 0.


This change is Reviewable

@dbolduc dbolduc marked this pull request as ready for review November 14, 2023 05:10
@dbolduc dbolduc requested a review from a team as a code owner November 14, 2023 05:10
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4523a0a) 92.97% compared to head (2066614) 92.97%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13125      +/-   ##
==========================================
- Coverage   92.97%   92.97%   -0.01%     
==========================================
  Files        2135     2135              
  Lines      185654   185665      +11     
==========================================
+ Hits       172618   172623       +5     
- Misses      13036    13042       +6     

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

@devbww
Copy link
Contributor

devbww commented Nov 14, 2023

I still like invoking the sleeper even when the duration is 0.

I agree. Even if there is no sleeping, it may have other side effects (despite this "sleeper" deciding that it won't).

@dbolduc dbolduc merged commit fce4d68 into googleapis:main Nov 14, 2023
59 checks passed
@dbolduc dbolduc deleted the otel-no-trace-if-no-sleep branch November 14, 2023 06:13
@@ -58,8 +58,8 @@ std::unique_ptr<RetryPolicy> TestRetryPolicy() {
}

std::unique_ptr<BackoffPolicy> TestBackoffPolicy() {
return ExponentialBackoffPolicy(std::chrono::microseconds(1),
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these changes related at all?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. The backoff policy returns something in milliseconds, which rounds to 0.

virtual std::chrono::milliseconds OnCompletion() = 0;

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