You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
The spec does not describe whether the stats library maintains an internal buffer before passing stats to exporters, but in practice Go and C++ libraries seem to do that (and other languages like Python, Ruby, PHP and Node don't have stats implemented yet at all).
As the result, for push-based exporters (like Stackdriver) there might be two layers of buffering: one in the stats library, the other in the exporter. Such exporters should probably allow explicit flushing of their buffers, but it will be valuable to provide users a way to flush the buffer of the stats library as well.
This can be done to avoid data loss when a given view is unregistered or the process shuts down. It will also probably make testing easier; currently tests need to sleep (1, 2).
In census-instrumentation/opencensus-go#846 (where this discussion started) I initially proposed an explicit ReportUsage() function. An alternative (that is probably more user-friendly and does not expose as much implementation) is to require the stats libraries to provide functions to unregister/remove views and flush pending data to exporters when that happens.
The text was updated successfully, but these errors were encountered:
The spec does not describe whether the stats library maintains an internal buffer before passing stats to exporters, but in practice Go and C++ libraries seem to do that (and other languages like Python, Ruby, PHP and Node don't have stats implemented yet at all).
As the result, for push-based exporters (like Stackdriver) there might be two layers of buffering: one in the stats library, the other in the exporter. Such exporters should probably allow explicit flushing of their buffers, but it will be valuable to provide users a way to flush the buffer of the stats library as well.
This can be done to avoid data loss when a given view is unregistered or the process shuts down. It will also probably make testing easier; currently tests need to sleep (1, 2).
Go users seem to work around this by decreasing reporting period (census-instrumentation/opencensus-go#773). C++ library does not allow changing the reporting period, which is hard-coded to be 10.
In census-instrumentation/opencensus-go#846 (where this discussion started) I initially proposed an explicit
ReportUsage()
function. An alternative (that is probably more user-friendly and does not expose as much implementation) is to require the stats libraries to provide functions to unregister/remove views and flush pending data to exporters when that happens.The text was updated successfully, but these errors were encountered: