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

Collect and Export metric data before PeriodicMetricReader shutdown #2516

Closed
sfc-gh-sili opened this issue Jan 29, 2024 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@sfc-gh-sili
Copy link

Reporting the exact same issue as #1858

It seems that the issue was previously fixed in #1860, but the latest code does not have do another round of export on PeriodicMetricReader on Shutdown anymore.

@sfc-gh-sili sfc-gh-sili added the bug Something isn't working label Jan 29, 2024
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jan 29, 2024
@lalitb lalitb self-assigned this Jan 29, 2024
@marcalff marcalff removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jan 29, 2024
@lalitb
Copy link
Member

lalitb commented Jan 30, 2024

@sfc-gh-sili This was changed as part of #2064. You need to now call Meterprovider::Forceflush() before MeterProvider::Shutdown() for one last collect cycle. The reason is

  • It offers greater flexibility for applications that wish to shut down promptly, as the collection cycle can be time-consuming when dealing with a large number of different metrics, and they may not want to delay.
  • It aligns with the shutdown process for traces and logs. Applications need to invoke flush for exporting pending spans/logs before shutdown.
  • The specifications do not require or mention this.

Closing this based on the information above, but please don't hesitate to reopen it if you find this valid issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants