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
Thanks for raising the issue. I like the second approach, though it needs some design discussion. As we are nearing the Release Candidate, have added it for the next milestone (GA).
The
MeterProvider::AddMetricReader
interface does not make it easy to create pull-based readers. For example, my unit tests look something like this:Notice the raw pointer reference to object owned by the
std::unique_ptr
(yuck)I would suggest two options for an alternative:
The simplest change would be to change the
AddMetricReader
method:To allow for shared ownership.
A more complex (and somewhat nicer IMHO) fix would be to abstract away the
MetricReader
class entirely:Where the returned
MetricReader
interface provides theCollect()
method that can be called to triggerMetricExporter::Collect
Both options follow the SDK documentation as well as I understand them.
The text was updated successfully, but these errors were encountered: