dhindrik / TinyInsights.Maui

TinyInsights is a library for tracking and a website for showing insights for your .NET MAUI app. Data will be saved in Application Insights. The website will help you to show the data in a more mobile app-friendly user interface.
MIT License
32 stars 6 forks source link

Tracking Dependencies #12

Open renelaerke opened 1 month ago

renelaerke commented 1 month ago

Hi Daniel,

I'm currently starting using TinyInsights.Maui in my mobile app.

However I'm not getting how to use Dependency Tracking especially with the api I'm calling.

Any api call will be structured like this

https://<>.site.com/api/entity/list https://<>.site.com/api/entity/<> etc...

This api is using GET for read, POST for insert, PATCH for update and DELETE for delete - as I understand it a basic webapi.

However - when I use TrackDepencency I would like the Blazor mini-site to be a bit more up to the task. As it is for now it seems to show dependency stats based upon the url (removing any query params (thumbs-up))

On the one hand I would like to be able to capture the full url in the dependency tracking - but on the other having dependency tracking "stats" be without <> and <>

I thought of having the stats be presented on the Blazor size be by either "url" (as it is now) OR by dependency name. If this functionality was available I could rather easily set the name to something like

"PATCH *.site.com/api/entity/" while having the url (data) be "https://firstcompany.site.com/api/entity/9f046867-aee2-47fc-9d79-2189be62b1ed"

By having the Blazor site utilising both by name and by url I think this would enable some much appreciated functionality.

I know I could do it myself leveraging custom queries - but I would think it would be nicer if baked in !

Any thoughts ?

dhindrik commented 1 month ago

Good feedback. Maybe it should always log HttpMethod too. It will be pretty easy to add. Then it will be possible to add views based on that data.

Using the MessageHandler will always track the full URL for you. Right now I only show that on the failed dependency details page.

dhindrik commented 1 month ago

I added tracking of it. I will add it to the views later. Also docs are not updated yet.