Author Topic: Analytics for .NET?  (Read 2992 times)

0 Members and 1 Guest are viewing this topic.

Atook

  • Swamp Rat
  • Posts: 1029
  • AKA Tim
Analytics for .NET?
« on: February 18, 2019, 12:08:01 PM »
I'm looking to collect some simple user analytics, such as run times, machine ID, CAD Version, etc. Something web based like google analytics. Reporting could include active users last month, most popular commands, etc.

Everything I've found on the web is for either mobile apps or web. There's a Google analytics kludge where you make http calls to web pages, but that sounds a bit rough IMO. Not to mention I'm trying to get away from the Goog these days.

Seems like Serilog is popular here, but I'm having trouble finding a sink service that would fit my needs. (Seq maybe?)

Anyone using this type of service/plugin they'd recommend?


It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8691
  • AKA Daniel
Re: Analytics for .NET?
« Reply #1 on: February 20, 2019, 08:01:30 AM »
.... puts on tinfoil hat ....

Keith Brown

  • Swamp Rat
  • Posts: 601
Re: Analytics for .NET?
« Reply #2 on: February 22, 2019, 10:34:17 AM »
Anyone using this type of service/plugin they'd recommend?


I use serilog to log in realtime to a text file and in DEBUG mode to a text file and a SEQ database so I can view logging statements in realtime.  I use SEQ because i can install it on my local machine without any issues and it is extremely easy to access the logging page.  I just set a bookmark in my browser.  SEQ offers a C# API that will allow you to access the database and pull the information that you want out of it, although I have yet to use it.  My main reasoning for using SEQ is the ability to see the logging statements in real time.  In an application such as what you are describing, seeing real time logging is not really needed.  I would instead log to a SQL server and hook it up into a simple MVC website.  You could then easily access the data at any time using a simple filtering grid on a web page.  If you place the page on the net then you could have access to it anywhere.
Keith Brown | AutoCAD MEP Blog | RSS Feed
AutoCAD MEP 2014 / Revit MEP 2014 / EastCoast CAD/CAM addon / Visual Studio 2013

CADbloke

  • Bull Frog
  • Posts: 342
  • Crash Test Dummy
Re: Analytics for .NET?
« Reply #3 on: February 25, 2019, 09:44:22 PM »
I use Serilog too but with TailBlazer to see real-time logs on my desktop and Sentry for error reporting of apps from my customers. SEQ is probably what you are looking for if you want to keep data, Sentry is an easy way to get that data (and crash reports) sent to you. Sentry is mostly for error reports but there is plenty of scope to use it for information too. Data retention is not forever though.

Serilog to Sentry: https://github.com/getsentry/raven-csharp or the newer https://github.com/getsentry/sentry-dotnet
TailBlazer:  https://github.com/RolandPheasant/TailBlazer
Sentry: https://sentry.io/ -- Sentry is a paid-for app but I reckon it is worth it. There's a limited free plan which may suit you. Or you could look into their code at https://github.com/getsentry to see if it's worth building your own (spoiler alter: no).

Atook

  • Swamp Rat
  • Posts: 1029
  • AKA Tim
Re: Analytics for .NET?
« Reply #4 on: February 26, 2019, 05:25:55 PM »
Thanks for the insights guys.

CADbloke, I'm currently using Sentry for error reporting, I've thought about attaching extra data and reporting that, but as you mention, the data retention isn't very long.

I'll look into pushing serilog into an SQL database and setting up a MVC page to view the database. I'm surprised no ones marketing that already. I'd pay a small subscription for an easy plugin and pretty reports similar to Sentry.