I would like to find out a list of the most used browser versions in our application.
When I view the End-to-end transaction details I am able to see a "Dependency property" named "Browser version":
Can that perhaps also be used to query the logs?
For example, I'm trying to use:
traces
| where operation_Name == "Dependency"
| extend browserVersion = tostring(customDimensions["Browser version"])
| summarize count() by browserVersion
| order by count_ desc
But that returns no results.
I have also seen this question: Application Insight Analytics - Query Client Browser and Device
That makes a nice list but leaves out the browser version.
Should I use something else?
Your query looks correct, and the issue could be due to the "browser version" property. There might be a possibility of the "Browser version" property isn't being captured in the logs correctly.
To check whether it is being captured properly, I ran below set of queries and was able to retrieve the results as expected within the given timestamp.
traces
| where operation_Name == "DurableFunctionsHttp"
| extend browserVersion = tostring(customDimensions["Browser version"])
| summarize count() by browserVersion
| order by count_ desc
traces
| where operation_Name == "DurableFunctionsHttpStartDemo"
| extend properties = todynamic(tostring(customDimensions))
| project properties["Browser Version"]
Alternatively, You can run the below query to extract browser versions from the client agents or client Ip's.
traces
| where operation_Name == "DurableFunctionsHttpStartDemo"
| extend properties = tostring(customDimensions["Client_ip"])
| summarize count() by "browserversion"
Note: Verify the timestamp you are using if the query doesn't return any results. Let's suppose if you specified a timestamp of the previous 24 hours and no operations had taken place during that time period, it will only return zero results instead the exact results.