C#: Telemetry query for measuring (unsupport dataflow) library usage.

This commit is contained in:
Michael Nebel
2022-03-07 14:53:47 +01:00
parent c023808657
commit 918a6c7425

View File

@@ -0,0 +1,17 @@
/**
* @name Usage of unsupported APIs coming from external libraries
* @description A list of 3rd party APIs used in the codebase. Excludes test and generated code.
* @kind metric
* @tags summary
* @id csharp/telemetry/unsupported-external-api
*/
import csharp
import ExternalAPI
from ExternalAPI api, int usages
where
not api.isUninteresting() and
not api.isSupported() and
usages = strictcount(Call c | c.getTarget() = api)
select api.getInfo() as info, usages order by usages desc