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

Update PeriodicExportingMetricReader to never call export() concurrently #2873

Merged

Conversation

aabmass
Copy link
Member

@aabmass aabmass commented Aug 11, 2022

Description

Add a lock in PeriodicExportingMetricReader which is held whenever its paired exporter is called.

Fixes #2859

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Added new test (verified it the test was failing before the fix)

Does This PR Require a Contrib Repo Change?

Answer the following question based on these examples of changes that would require a Contrib Repo Change:

  • The OTel specification has changed which prompted this PR to update the method interfaces of opentelemetry-api/ or opentelemetry-sdk/

  • The method interfaces of test/util have changed

  • Scripts in scripts/ that were copied over to the Contrib repo have changed

  • Configuration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in

    • pyproject.toml
    • isort.cfg
    • .flake8
  • When a new .github/CODEOWNER is added

  • Major changes to project information, such as in:

    • README.md
    • CONTRIBUTING.md
  • 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

@aabmass aabmass force-pushed the metric-exporter-concurrency-2859 branch from b5df03b to af1791c Compare August 11, 2022 19:06
@aabmass aabmass force-pushed the metric-exporter-concurrency-2859 branch from af1791c to 323013a Compare August 11, 2022 19:11
@aabmass aabmass marked this pull request as ready for review August 11, 2022 19:12
@aabmass aabmass requested a review from a team August 11, 2022 19:12
@srikanthccv srikanthccv merged commit ad3e239 into open-telemetry:main Aug 15, 2022
@aabmass aabmass deleted the metric-exporter-concurrency-2859 branch August 15, 2022 19:36
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.

Test that MetricExporter.export() will not be called concurrently for the same instance
3 participants