microsoft / BCTech

Business Central technology samples
MIT License
571 stars 306 forks source link

Unable to use more than 10days of data in telemetry/PowerBI-dataset #246

Open FredrikStreby opened 6 months ago

FredrikStreby commented 6 months ago

When using the Power BI telemetry-app provided on appsource ( https://appsource.microsoft.com/en-us/product/power-bi/microsoftdynsmb.bc_telemetry_pbi_app?tab=Overview ) we have run into an error not allowing us to use more than 10 days of data in our dataset. If we set the report to include 10 days of telemetry data in our application insights it works well. If we try to include 20 days, we get the following error.

image

We've had this error for some time so the classic "wait and try again"-tactic is already tested.

Anyone else experiencing the same? [ValidateMarkupTags]<ccon>[ccon]DataSource.Error: Web.Contents failed to get contents from [ccon]https://api.applicationinsights.io/v1/apps/XXXXXXXXXX/query?query=set%20notruncation%0A%3B%0A%2F%2F%20WebServiceMetadataErrors%0Atraces%0A%7C%20where%20timestamp%20%3E%3D%20ago%2820d%29%20%2F%2F%20adjust%20as%20needed.%20The%20value%2020%20comes%20from%20the%20app%20configuration%0A%7C%20where%20customDimensions%20has%20%27RT0033%27%20or%0A%20%20%20%20%20%20%20%20customDimensions%20has%20%27RT0034%27%20or%0A%20%20%20%20%20%20%20%20customDimensions%20has%20%27RT0035%27%20or%0A%20%20%20%20%20%20%20%20customDimensions%20has%20%27RT0036%27%20or%0A%20%20%20%20%20%20%20%20%2F%2F%20RT0037%20not%20documented%20%28yet%3F%29%0A%20%20%20%20%20%20%20%20customDimensions%20has%20%27RT0038%27%20or%0A%20%20%20%20%20%20%20%20customDimensions%20has%20%27RT0039%27%0A%7C%20where%20customDimensions.eventId%20in%20%28%20%27RT0033%27%2C%20%27RT0034%27%2C%27RT0035%27%2C%20%20%27RT0036%27%2C%20%27RT0038%27%2C%20%27RT0039%27%20%29%20%0A%7C%20where%20isnotempty%28customDimensions.aadTen[/ccon]' (400): [ccon]Bad Request[/ccon]. DataSourceKind = [ccon]Web[/ccon]. DataSourcePath = [ccon]https://api.applicationinsights.io/v1/apps/XXXXXXXXXX/query[/ccon]. Url = [ccon]https://api.applicationinsights.io/v1/apps/XXXXXXXXXX/query?query=set%20notruncation%0A%3B%0A%2F%2F%20WebServiceMetadataErrors%0Atraces%0A%7C%20where%20timestamp%20%3E%3D%20ago%2820d%29%20%2F%2F%20adjust%20as%20needed.%20The%20value%2020%20comes%20from%20the%20app%20configuration%0A%7C%20where%20customDimensions%20has%20%27RT0033%27%20or%0A%20%20%20%20%20%20%20%20customDimensions%20has%20%27RT0034%27%20or%0A%20%20%20%20%20%20%20%20customDimensions%20has%20%27RT0035%27%20or%0A%20%20%20%20%20%20%20%20customDimensions%20has%20%27RT0036%27%20or%0A%20%20%20%20%20%20%20%20%2F%2F%20RT0037%20not%20documented%20%28yet%3F%29%0A%20%20%20%20%20%20%20%20customDimensions%20has%20%27RT0038%27%20or%0A%20%20%20%20%20%20%20%20customDimensions%20has%20%27RT0039%27%0A%7C%20where%20customDimensions.eventId%20in%20%28%20%27RT0033%27%2C%20%27RT0034%27%2C%27RT0035%27%2C%20%20%27RT0036%27%2C%20%27RT0038%27%2C%20%27RT0039%27%20%29%20%0A%7C%20where%20isnotempty%28customDimensions.aadTenantId%29%20%2F%2F%20f...[/ccon]. [/ccon]. The exception was raised by the IDbCommand interface.</ccon> Table: WebServiceMetadataErrors.

KennieNP commented 6 months ago

You have too many web service metadata errors in your telemetry (this makes the PBI report timeout).

I will fix the report dataset definition.

Meanwhile, learn more about the errors here (the article contains a KQL query for easy analysis) https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-publish-failure-trace and resolve them. This will hopefully unblock you.

jwikman commented 6 months ago

I just investigated those web service metadata events, and it seems as if we get 20000+ RT0038 events each day, from a lot of different tenants.

But I have no idea on how I should resolve them. The event message is "Web service metadata warning: Multiple options while generation navigation property for tablerelation", but what does that mean and how should I resolve them?

Below are some samples of the RT0038 event details:

metadataStack: MetaTable ID: 5475, Extension Name Base Application NavigationElement: 30012
otherNavigationProperties: customer customerFinancialDetail
pickedNavigationPropertyType: customer
--
metadataStack: MetaTable ID: 5475, Extension Name Base Application NavigationElement: 20012
otherNavigationProperties: customer customerFinancialDetail
pickedNavigationPropertyType: customer
--
metadataStack: MetaTable ID: 5475, Extension Name Base Application NavigationElement: 70314155
otherNavigationProperties: customer customerFinancialDetail
pickedNavigationPropertyType: customer

The last one seems to be related to one of our apps, since 70314155 is the id of one of our API pages. But I still do not understand what we should do to avoid this event.

Most RT0038 events contains BaseApp or 1st party (MS) apps id ranges, so I do not know if I could do anything about those?

FredrikStreby commented 5 months ago

A little bump for this one.

How can I/we resolve the errors thrown?