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
Run the following code in a loop. Many iterations take only about 0.01 seconds to run but some can take a long time (~30 seconds).
function out = currentsecond()
% callback function for an observable gauge
dt = datetime("now");
s = second(dt);
out = opentelemetry.metrics.ObservableResult;
out = out.observe(s);
for i=1:10,
mp = opentelemetry.sdk.metrics.MeterProvider();
opentelemetry.metrics.Provider.setMeterProvider(mp);
clear
mp = opentelemetry.metrics.Provider.getMeterProvider();
m = getMeter(mp, "foo");
g = createObservableGauge(m, @currentsecond, "bar");
tic;
opentelemetry.sdk.common.Cleanup.shutdown(mp);
toc;
end
In comparison, if the code is changed to create a synchronous instrument (e.g. counter) instead of an asynchronous one, then shutdown never takes a long time, always around 0.01 seconds.
This issue causes an asynchronous example test in test/texamples.m to be filtered out due to the time it takes to run the test.
The text was updated successfully, but these errors were encountered:
Run the following code in a loop. Many iterations take only about 0.01 seconds to run but some can take a long time (~30 seconds).
In comparison, if the code is changed to create a synchronous instrument (e.g. counter) instead of an asynchronous one, then shutdown never takes a long time, always around 0.01 seconds.
This issue causes an asynchronous example test in test/texamples.m to be filtered out due to the time it takes to run the test.
The text was updated successfully, but these errors were encountered: