How to include metrics from other projects
neilcrowther opened this issue · comments
I am investigating using metrics.net for an API project, and any metrics I add into the API show on the dashboard as expected. However if I add metrics to any associated projects (e.g. a database call made in another project that is referenced and used by the API project), then the metrics are not displayed on the API dashboard. Is this by design, or am I missing any setup that would allow the API dashboard to show all metrics that are configured?
If the project is referenced the metrics should show in the Dashboard.
What might happen, is that a metric is registered the first time it is used. Make sure you are actually executing the database call and then check the corresponding metrics in the menus of the dashboard.
Also keep in mind that if a metric is not yet registered when you open the Dashboard it will not automatically show up on the dashboard, but it will be available in the menus. You can also try refreshing the page.
Thanks for the fast response. Upon checking again it turns out I put the test timer around one code path, and then executed another before looking at the dashboard. When I then debugged it I saw it hitting the breakpoints (as I was now executing the expected path) but then obviously did not refresh the dashboard. It was obviously too late in my day :-) Sorry for wasting your time. I must say that the project looks really impressive, so thanks for all your work!
Thanks for the kind words, I'm glad you found it useful. Rest assured, you have not wasted anything. I'll consider updating the docs & dashboard to avoid this kind of issues for other users.