* Checks whether telemetry is supported. * Its possible this function gets called within Debug Adapter, vscode isn't available in there. * Within DA, there's a completely different way to send telemetry.
()
| 24 | * Within DA, there's a completely different way to send telemetry. |
| 25 | */ |
| 26 | function isTelemetrySupported(): boolean { |
| 27 | try { |
| 28 | // In ESM, vscode is already imported at the top, so we just need to check if telemetry reporter is available |
| 29 | return getTelemetryReporter() !== undefined; |
| 30 | } catch { |
| 31 | return false; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Checks if the telemetry is disabled in user settings |
no test coverage detected