def METHOD_NAME(self):
    _STATSBEAT_STATE["INITIAL_SUCCESS"] = False
    _STATSBEAT_STATE["INITIAL_FAILURE_COUNT"] = 1
    with mock.patch("azure.monitor.opentelemetry.exporter.statsbeat._statsbeat.shutdown_statsbeat_metrics") as m:
        with mock.patch.object(AzureMonitorClient, 'track', throw(Exception)):
            result = self._exporter._transmit(self._envelopes_to_export)
    self.assertEqual(result, ExportResult.FAILED_NOT_RETRYABLE)
    self.assertFalse(_STATSBEAT_STATE["INITIAL_SUCCESS"])
    self.assertEqual(_STATSBEAT_STATE["INITIAL_FAILURE_COUNT"], 2)
    m.assert_not_called()