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

Standardizing timeout calculation in measurement consumer collect to nanoseconds #4074

Merged
merged 8 commits into from
Jul 23, 2024

Conversation

mdcg
Copy link
Contributor

@mdcg mdcg commented Jul 23, 2024

Description

I made some changes to standardize the timeout calculation in the "collect" method of the "measurement consumer" to nanoseconds. The default_timeout_millis was in milliseconds and the remaining_time in nanoseconds, and shortly after, there was a comparison between these two values with "different bases" to update the timeout_millis value of the CallbackOptions.

I also updated some sections to use scientific notation instead of exponentiation.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Tested only using the existing tests. I did not create any new ones.

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@mdcg mdcg requested a review from a team July 23, 2024 16:44
Copy link

linux-foundation-easycla bot commented Jul 23, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@mdcg mdcg changed the title WIP: Standardizing timeout calculation in measurement consumer collect to nanoseconds Standardizing timeout calculation in measurement consumer collect to nanoseconds Jul 23, 2024
Copy link
Member

@emdneto emdneto left a comment

Choose a reason for hiding this comment

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

Care to fix lint and add CHANGELOG entry?

@mdcg mdcg requested a review from emdneto July 23, 2024 21:31
CHANGELOG.md Outdated Show resolved Hide resolved
@mdcg
Copy link
Contributor Author

mdcg commented Jul 23, 2024

@emdneto I removed the test I had created because I thought better of it and found it unnecessary. If we just test whether the CallbackOptions timeout_millis value is less than 10000, it is enough.

@ocelotl ocelotl merged commit 3f95781 into open-telemetry:main Jul 23, 2024
284 checks passed
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