fix: timeout being ignored in MeterProvider shutdown_with_timeout#3438
fix: timeout being ignored in MeterProvider shutdown_with_timeout#3438partg952 wants to merge 1 commit intoopen-telemetry:mainfrom
Conversation
|
Hey @partg952 , thanks for opening the PR! opentelemetry-rust/opentelemetry-sdk/src/metrics/periodic_reader.rs Lines 495 to 497 in 146376f and a 5 second duration is used instead: opentelemetry-rust/opentelemetry-sdk/src/metrics/periodic_reader.rs Lines 593 to 595 in 146376f ( I reckon with that fixed, we'd also want a changelog entry in opentelemetry-sdk, because the observed behaviour of the shutdown will change - we'll honour the API! Could you also add a regression test that verifies the timeout is passed through? |
scottgerring
left a comment
There was a problem hiding this comment.
left a comment above with some suggestions!
|
Hey @scottgerring ,Thanks for taking a look , I will definitely edit it further and then add the regression test for it. Thanks! |
Hey @scottgerring , I have a little unclarity here, in periodic reeader, the shutdown with timeout is calling inner.shutdown normally without respecting the timeout , so do you want me to implement the whole functionality or just pass it down through the consequent function calls? |
Fixes #2574
Changes
Passed down the ignored timeout argument in shutdown_with_timeout in MeterProvider
When calling the shutdown_with_timeout in MeterProvider the timeout was being ignored and not being passed down the incoming inner function calls
This PR fixes that by calling shutdown_with_timeout at each level and passing timeout along with it.
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial, user-facing changes