Shutting down a MeterProvider with a asynchronous instrument can take a long time
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- matlab
- Ambito
- observability-sre, testing-qa
Direzione di ricerca
Start by running the supplied MATLAB loop and compare shutdown timing for the observable gauge and synchronous counter. Inspect the MeterProvider creation and opentelemetry.sdk.common.Cleanup.shutdown path, then review the asynchronous example in test/texamples.m. Done means asynchronous shutdown no longer intermittently takes about 30 seconds and the example test no longer needs filtering.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- MATLAB
- Stelle
- 19
- Fork
- 4
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di mathworks/OpenTelemetry-MATLAB
-
documentation
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
-
documentation
mathworks/OpenTelemetry-MATLAB#248 · 1 assegnatario ·
-
test
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
otel-cpp changes
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
-
enhancement
mathworks/OpenTelemetry-MATLAB#242 · 1 commento · 1 assegnatario ·
Tutte le issue di mathworks/OpenTelemetry-MATLAB
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
rmbase ERP in study Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
-
Documentation Good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100