Telemetry and Companies

I don’t know about you – but when working with Telemetry, I found it sometimes tedious to map certain traces to actual customers (names of the company, that is).  Here’s a small post on how I handle it today.

We (our company – we are a partner of a multitude of Business Central customers) have one endpoint that collects all traces from all customers.  I know some partners have an endpoint per customer – but this setup actually works really well for us, as it’s so easy to compare one customer with another.

Now, the only real field in Telemetry that identifies a customer, is the “aadTenantId“.  EVERY SINGLE EVENT in Telemetry contains an aadTenantId (well .. like I noticed today .. apparenlty this is not true for some PTE extension validation events in v23 (which I don’t understand, quite honestly, but that’s not important for now ;-))).  Yes, I do know, we also have a companyName – but not on all events.  In fact, I found 113 events that didn’t have a companyName in the customDimensions.

In my book, that’s too much to ignore, so personally, I want to always work with the aadTenantId.

The problem (at least on my side), mostly, the aadTenantId is some kind of GUID.  You must have seen it when working for example with the PowerBI App that Microsoft provided, where you can filter on aadTenantId.  Well: good luck:

In any of those – what customer am I actually filtering?

So I created a simple KQL query that provides a table with all customers, their aadTenantId and all their companynames, which you can find here: waldo.BCTelemetry/General/Customers.kql at master · waldo1001/waldo.BCTelemetry · GitHub

The query is simply going to take all traces, and get whatever event it finds with both an aadTenantId and a companyName. That output, I simply summerize (hence: group and only take the unique combination of fields (group by)).  On top of that, I tried to identify it a bit more by indicating if a certain customer is SaaS or not.  I’m not sure there is a better way to do this, quite honestly (I don’t really use that part of the information ;-)).

So – whenever I’m interested in the data of a certain company, this is the first query I run, so I can use the GUID that comes back in PowerBI or other queries in KQL.

Enjoy!

5.00 avg. rating (97% score) - 1 vote

Permanent link to this article: https://www.waldo.be/2024/02/28/telemetry-and-companies/

3 comments

1 ping

    • Kine on February 28, 2024 at 7:49 am
    • Reply

    There is API to get the tenant name based on the tenant ID… 😉

    See https://github.com/kine/PSTrash/blob/master/Get-TenantMapWithNames.ps1

    • martijn on February 28, 2024 at 10:35 pm
    • Reply

    Hi Waldo,
    You can also setup an AAD to customer name mapping for the Microsoft provided power BI.
    See https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-power-bi-app#configure-an-app-after-initial-setup.
    Then on the top right of the power BI report you are able to select the company names instead of the AAD tenant ID’s. This makes it easier to search in the power BI report.

      • waldo on February 28, 2024 at 10:38 pm
        Author

      Given that you’d work with PowerBI ;-). I usually just work in KQL to do my analysis.
      But this is a great tip for, thanks!

  1. […] Telemetry and Companies […]

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.