Skip to content

PeriodicExportingMetricReader: Incorrect ValueError message of not accepting infinity as interval value #3768

@howardyoo

Description

@howardyoo

When an invalid value is entered as interval for PeriodicExportingMetricReader, there is an error message generated here that states:

                f"interval value {self._export_interval_millis} is invalid \
                and needs to be larger than zero and lower than infinity."

However, this is not correct and misleading as math.inf can be provided as a value (which will effectively set the interval to infinity and make periodic exporting metric reader to not move in interval, which is something that this PR addressed.

What is the expected behavior?
Error message should state:

                f"interval value {self._export_interval_millis} is invalid \
                and needs to be larger than zero and lower or equal to infinity."

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions