Bug fix: detect and adapt to backoff package version by nickstenning · Pull Request #2980 · open-telemetry/opentelemetry-python

@nickstenning requested a review from a team

October 18, 2022 22:22

srikanthccv

srikanthccv

srikanthccv

Since backoff==2.0.0, the API of the expo function has changed. The
"porcelain" methods of the backoff library (the decorators
backoff.on_exception and backoff.on_predicate) send a "None" value into
the generator and discard the first yielded value. This is for
compatibility with the more general wait generator API inside the
backoff package.

This commit allows the OTLP exporters to automatically detect the
behavior of the installed backoff package and adapt accordingly.
Since backoff==2.0.0, the API of the expo function has changed. The
"porcelain" methods of the backoff library (the decorators
backoff.on_exception and backoff.on_predicate) send a "None" value into
the generator and discard the first yielded value. This is for
compatibility with the more general wait generator API inside the
backoff package.

This commit allows the HTTP OTLP metrics exporter to automatically
detect the behavior of the installed backoff package and adapt
accordingly.

@ocelotl

This was referenced

Oct 31, 2022

@CaueP CaueP mentioned this pull request

Mar 13, 2023